From: Jens Axboe Date: Mon, 12 Mar 2007 10:01:25 +0000 (+0100) Subject: If filename not given, use jobname X-Git-Tag: fio-1.14~41 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=80be24f4671164d597463e4b5c794d4cbd0a4537 If filename not given, use jobname Signed-off-by: Jens Axboe --- 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))