X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=62080f74949f09a9abbdb1ce2fa40ee2b9a7731d;hp=ba33a5e3264303f198087730ae9f6b0a9bb12566;hb=80be24f4671164d597463e4b5c794d4cbd0a4537;hpb=ba0fbe1029bae1de08d66a72b6d0b2505c67c438 diff --git a/init.c b/init.c index ba33a5e3..62080f74 100644 --- a/init.c +++ b/init.c @@ -819,8 +819,11 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num) if (td->odirect) td->io_ops->flags |= FIO_RAWIO; + if (!td->filename) + td->filename = strdup(jobname); + td->filetype = FIO_TYPE_FILE; - if (td->filename && !lstat(td->filename, &sb)) { + if (!lstat(td->filename, &sb)) { if (S_ISBLK(sb.st_mode)) td->filetype = FIO_TYPE_BD; else if (S_ISCHR(sb.st_mode))