init.c: Fix non-regular-file booboo
authorJoel Becker <Joel.Becker@oracle.com>
Tue, 13 Mar 2007 07:10:14 +0000 (08:10 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 13 Mar 2007 07:10:14 +0000 (08:10 +0100)
If a filename is given, and that filename is a device file, fio will
ignore the filename, using the job name.  Then it tries to open the job
name instead of the filename.  Whoops.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
init.c

diff --git a/init.c b/init.c
index a2ff7bc5593063d2964e4f8a23632ae221ceca73..624d2842d69b2e576487357d9d6f44e4443f650c 100644 (file)
--- a/init.c
+++ b/init.c
@@ -884,7 +884,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num)
 
                memset(f, 0, sizeof(*f));
                f->fd = -1;
-               f->file_name = strdup(jobname);
+               f->file_name = strdup(td->filename);
        }
 
        for_each_file(td, f, i) {