Merge branch 'master' of https://github.com/donny372/fio into master
[fio.git] / init.c
diff --git a/init.c b/init.c
index 3710e3d404acf84599076098cbe6569282b448a8..84325f1e86fc800cdef58140d677004b4eacf9f1 100644 (file)
--- a/init.c
+++ b/init.c
@@ -2068,6 +2068,18 @@ static int __parse_jobs_ini(struct thread_data *td,
                }
 
                ret = fio_options_parse(td, opts, num_opts);
+
+               if (!ret) {
+                       if (!strcmp(file, "-") && td->o.read_iolog_file != NULL) {
+                               char *fname = get_name_by_idx(td->o.read_iolog_file,
+                                                             td->subjob_number);
+                               if (!strcmp(fname, "-")) {
+                                       log_err("fio: we can't read both iolog "
+                                               "and job file from stdin.\n");
+                                       ret = 1;
+                               }
+                       }
+               }
                if (!ret) {
                        if (dump_cmdline)
                                dump_opt_list(td);