Support limited mixed command line options and job file
authorJens Axboe <axboe@fb.com>
Sun, 6 Apr 2014 16:10:32 +0000 (10:10 -0600)
committerJens Axboe <axboe@fb.com>
Sun, 6 Apr 2014 16:10:32 +0000 (10:10 -0600)
With this, you can now do:

$ fio --timeout=10s --time_based=1 jobfile.fio

and have the command line options work as if they were part
of the global section of jobfile.fio

Note that more advanced uses, like:

$ fio --option_foo=1 jobfile.fio --option_bar=1 jobfile2.fio

will not work, we still clear to default options for
subsequent jobs.

Signed-off-by: Jens Axboe <axboe@fb.com>
init.c

diff --git a/init.c b/init.c
index 11876b9a98a493114398df5d58f5042bf7f42ef5..e9e49ebb3e478f6db4733714a1663ca567969843 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2033,7 +2033,7 @@ int parse_options(int argc, char *argv[])
 
        if (job_files > 0) {
                for (i = 0; i < job_files; i++) {
 
        if (job_files > 0) {
                for (i = 0; i < job_files; i++) {
-                       if (fill_def_thread())
+                       if (i && fill_def_thread())
                                return 1;
                        if (nr_clients) {
                                if (fio_clients_send_ini(ini_file[i]))
                                return 1;
                        if (nr_clients) {
                                if (fio_clients_send_ini(ini_file[i]))