Rework 'dump_cmdline'
[fio.git] / options.c
index 627029cd732ccba701079e3ec1d7f6d5c3a35b15..caa00af8f5e1dcf9c74c24ef8c1a4b1ea344e5d8 100644 (file)
--- a/options.c
+++ b/options.c
@@ -3140,6 +3140,15 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_GENERAL,
                .group  = FIO_OPT_G_PROCESS,
        },
+       {
+               .name   = "exitall_on_error",
+               .lname  = "Exit-all on terminate in error",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(unlink),
+               .help   = "Terminate all jobs when one exits in error",
+               .category = FIO_OPT_C_GENERAL,
+               .group  = FIO_OPT_G_PROCESS,
+       },
        {
                .name   = "stonewall",
                .lname  = "Wait for previous",
@@ -4070,19 +4079,22 @@ static void show_closest_option(const char *opt)
        free(name);
 }
 
-int fio_options_parse(struct thread_data *td, char **opts, int num_opts,
-                       int dump_cmdline)
+int fio_options_parse(struct thread_data *td, char **opts, int num_opts)
 {
+       struct flist_head *opt_list = NULL;
        int i, ret, unknown;
        char **opts_copy;
 
+       if (!is_def_thread(td))
+               opt_list = &td->opt_list;
+
        sort_options(opts, fio_options, num_opts);
        opts_copy = dup_and_sub_options(opts, num_opts);
 
        for (ret = 0, i = 0, unknown = 0; i < num_opts; i++) {
                struct fio_option *o;
                int newret = parse_option(opts_copy[i], opts[i], fio_options,
-                                               &o, td, dump_cmdline);
+                                               &o, td, opt_list);
 
                if (!newret && o)
                        fio_option_mark_set(&td->o, o);
@@ -4115,7 +4127,7 @@ int fio_options_parse(struct thread_data *td, char **opts, int num_opts,
                        if (td->eo)
                                newret = parse_option(opts_copy[i], opts[i],
                                                      td->io_ops->options, &o,
-                                                     td->eo, dump_cmdline);
+                                                     td->eo, opt_list);
 
                        ret |= newret;
                        if (!o) {