Catch more places where the callback should just return on parse/check
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/options.c b/options.c
index a20b5c5..a064764 100644
--- a/options.c
+++ b/options.c
@@ -168,6 +168,9 @@
char *str, *p, *odir, *ddir;
int ret = 0;
+ if (parse_dryrun())
+ return 0;
+
p = str = strdup(input);
strip_blank_front(&str);
@@ -290,6 +293,10 @@
struct thread_data *td = data;
char *str, *p, *n;
int type = 0, ret = 1;
+
+ if (parse_dryrun())
+ return 0;
+
p = str = strdup(input);
strip_blank_front(&str);
@@ -315,6 +322,9 @@
struct thread_options *o = &td->o;
char *nr = get_opt_postfix(str);
+ if (parse_dryrun())
+ return 0;
+
o->ddir_seq_nr = 1;
o->ddir_seq_add = 0;
@@ -391,6 +401,9 @@
long max_cpu;
int ret;
+ if (parse_dryrun())
+ return 0;
+
ret = fio_cpuset_init(&td->o.cpumask);
if (ret < 0) {
log_err("fio: cpuset_init failed\n");
@@ -489,6 +502,9 @@
struct thread_data *td = data;
int ret;
+ if (parse_dryrun())
+ return 0;
+
ret = set_cpus_allowed(td, &td->o.cpumask, input);
if (!ret)
td->o.cpumask_set = 1;
@@ -514,6 +530,9 @@
{
struct thread_data *td = data;
+ if (parse_dryrun())
+ return 0;
+
/* numa_parse_nodestring() parses a character string list
* of nodes into a bit mask. The bit mask is allocated by
* numa_allocate_nodemask(), so it should be freed by
@@ -536,8 +555,12 @@
const char * const policy_types[] =
{ "default", "prefer", "bind", "interleave", "local", NULL };
int i;
+ char *nodelist;
- char *nodelist = strchr(input, ':');
+ if (parse_dryrun())
+ return 0;
+
+ nodelist = strchr(input, ':');
if (nodelist) {
/* NUL-terminate mode */
*nodelist++ = '\0';
@@ -669,6 +692,9 @@
double val;
char *nr;
+ if (parse_dryrun())
+ return 0;
+
if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
val = 1.1;
else if (td->o.random_distribution == FIO_RAND_DIST_PARETO)
@@ -799,6 +825,9 @@
{
struct thread_data *td = data;
+ if (parse_dryrun())
+ return 0;
+
if (!td->files_index)
td->o.nr_files = 0;