Normally we hide children if the parent isn't set, but for some
options it's the other way around.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
struct fio_option *o;
int i;
+ if (parent->hide_on_set)
+ visible = !visible;
+
/*
* This isn't super fast, but it should not be an issue. If it is, we
* can speed it up by caching the lookup at least. Or we can do it
.help = "Greatly reduce number of gettimeofday() calls",
.cb = str_gtod_reduce_cb,
.def = "0",
+ .hide_on_set = 1,
.category = FIO_OPT_C_STAT,
.group = FIO_OPT_G_INVALID,
},
struct value_pair posval[PARSE_MAX_VP];/* possible values */
const char *parent; /* parent option */
int hide; /* hide if parent isn't set */
+ int hide_on_set; /* hide on set, not on unset */
const char *inverse; /* if set, apply opposite action to this option */
struct fio_option *inv_opt; /* cached lookup */
int (*verify)(struct fio_option *, void *);