[PATCH] Add support for the read/write interface of SG v3
diff --git a/fio-ini.c b/fio-ini.c
index 2340589..c940622 100644
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -204,8 +204,12 @@
 		td->zone_size = 0;
 
 	td->filetype = FIO_TYPE_FILE;
-	if (!stat(jobname, &sb) && S_ISBLK(sb.st_mode))
-		td->filetype = FIO_TYPE_BD;
+	if (!stat(jobname, &sb)) {
+		if (S_ISBLK(sb.st_mode))
+			td->filetype = FIO_TYPE_BD;
+		else if (S_ISCHR(sb.st_mode))
+			td->filetype = FIO_TYPE_CHAR;
+	}
 
 	if (td->filetype == FIO_TYPE_FILE) {
 		if (td->directory[0] != '\0')