X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=fio-ini.c;h=c94062279989285ed20a0326e2297f86bf94029b;hp=234058980b3d11ab9e7e45f4c896e1d8495eaea3;hb=0af7b542b69af5ab2400a9960a5bcde82c05723f;hpb=ba4f8923a7d7b02e69f6daee8dee5ed6e44722ce diff --git a/fio-ini.c b/fio-ini.c index 23405898..c9406227 100644 --- 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')