Add initial support for profile specific options
Not complete yet, we need to split option parsing for profiles a
bit.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index 03b2437..2f38b4a 100644
--- a/options.c
+++ b/options.c
@@ -1959,7 +1959,7 @@
int fio_show_option_help(const char *opt)
{
- return show_cmd_help(options, opt);
+ return show_cmd_help(options, &ext_opt_list, opt);
}
static void __options_mem(struct thread_data *td, int alloc)
@@ -2019,3 +2019,17 @@
option_init(&eopt->o);
flist_add_tail(&eopt->list, &ext_opt_list);
}
+
+void prune_profile_options(const char *prof_name)
+{
+ struct ext_option *eo;
+ struct flist_head *n, *tmp;
+
+ flist_for_each_safe(n, tmp, &ext_opt_list) {
+ eo = flist_entry(n, struct ext_option, list);
+ if (strcmp(eo->prof_name, prof_name))
+ continue;
+ flist_del(&eo->list);
+ free(eo);
+ }
+}