From: Jens Axboe Date: Sat, 17 Feb 2007 00:51:13 +0000 (+0100) Subject: [PATCH] Fixup file type recognition X-Git-Tag: fio-1.12~80 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=890df538b3645d9310a3527513195773130d1d7f;p=fio.git [PATCH] Fixup file type recognition Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index f4a37401..9e41d55a 100644 --- a/init.c +++ b/init.c @@ -679,7 +679,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num) td->io_ops->flags |= FIO_RAWIO; td->filetype = FIO_TYPE_FILE; - if (!stat(jobname, &sb)) { + if (td->filename && !lstat(td->filename, &sb)) { if (S_ISBLK(sb.st_mode)) td->filetype = FIO_TYPE_BD; else if (S_ISCHR(sb.st_mode))