[PATCH] Add support for the read/write interface of SG v3
[fio.git] / fio-ini.c
index 234058980b3d11ab9e7e45f4c896e1d8495eaea3..c94062279989285ed20a0326e2297f86bf94029b 100644 (file)
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -204,8 +204,12 @@ static int add_job(struct thread_data *td, const char *jobname, int prioclass,
                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')