From: Joel Becker Date: Tue, 13 Mar 2007 07:10:14 +0000 (+0100) Subject: init.c: Fix non-regular-file booboo X-Git-Tag: fio-1.14~30 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=656395b6dfc16faf75c802ac82b78a5fdeaf439d init.c: Fix non-regular-file booboo 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 Signed-off-by: Jens Axboe --- diff --git a/init.c b/init.c index a2ff7bc5..624d2842 100644 --- 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) {