From 80be24f4671164d597463e4b5c794d4cbd0a4537 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 12 Mar 2007 11:01:25 +0100 Subject: [PATCH 1/1] If filename not given, use jobname Signed-off-by: Jens Axboe --- init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- 2.25.1