goptions: use glib n-ary tree for option dependencies
[fio.git] / options.c
index 2d816f9c3d64f2494d469ff1c85048bc1ed74998..161b416378ef506424ac6cbb2988c9380bd32051 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2327,33 +2327,6 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_IO,
                .group  = FIO_OPT_G_IO_TYPE,
        },
-       {
-               .name   = "bwavgtime",
-               .lname  = "Bandwidth average time",
-               .type   = FIO_OPT_INT,
-               .off1   = td_var_offset(bw_avg_time),
-               .help   = "Time window over which to calculate bandwidth"
-                         " (msec)",
-               .def    = "500",
-               .parent = "write_bw_log",
-               .hide   = 1,
-               .interval = 100,
-               .category = FIO_OPT_C_LOG,
-               .group  = FIO_OPT_G_INVALID,
-       },
-       {
-               .name   = "iopsavgtime",
-               .lname  = "IOPS average time",
-               .type   = FIO_OPT_INT,
-               .off1   = td_var_offset(iops_avg_time),
-               .help   = "Time window over which to calculate IOPS (msec)",
-               .def    = "500",
-               .parent = "write_iops_log",
-               .hide   = 1,
-               .interval = 100,
-               .category = FIO_OPT_C_LOG,
-               .group  = FIO_OPT_G_INVALID,
-       },
        {
                .name   = "create_serialize",
                .lname  = "Create serialize",
@@ -2521,6 +2494,33 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                .category = FIO_OPT_C_LOG,
                .group  = FIO_OPT_G_INVALID,
        },
+       {
+               .name   = "bwavgtime",
+               .lname  = "Bandwidth average time",
+               .type   = FIO_OPT_INT,
+               .off1   = td_var_offset(bw_avg_time),
+               .help   = "Time window over which to calculate bandwidth"
+                         " (msec)",
+               .def    = "500",
+               .parent = "write_bw_log",
+               .hide   = 1,
+               .interval = 100,
+               .category = FIO_OPT_C_LOG,
+               .group  = FIO_OPT_G_INVALID,
+       },
+       {
+               .name   = "iopsavgtime",
+               .lname  = "IOPS average time",
+               .type   = FIO_OPT_INT,
+               .off1   = td_var_offset(iops_avg_time),
+               .help   = "Time window over which to calculate IOPS (msec)",
+               .def    = "500",
+               .parent = "write_iops_log",
+               .hide   = 1,
+               .interval = 100,
+               .category = FIO_OPT_C_LOG,
+               .group  = FIO_OPT_G_INVALID,
+       },
        {
                .name   = "group_reporting",
                .lname  = "Group reporting",
@@ -3346,3 +3346,9 @@ void fio_options_free(struct thread_data *td)
                td->eo = NULL;
        }
 }
+
+struct fio_option *fio_option_find(const char *name)
+{
+       return find_option(fio_options, name);
+}
+