White space spring cleaning
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index dd4e4dd06208233f0303193119f10758162682e5..631701363f13a14989554b4cb9f1f38c7d3bee29 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -16,7 +16,6 @@
 #include "options.h"
 
 static struct fio_option *__fio_options;
-extern unsigned int fio_get_kb_base(void *);
 
 static int vp_cmp(const void *p1, const void *p2)
 {
@@ -47,7 +46,7 @@ static void posval_sort(struct fio_option *o, struct value_pair *vpmap)
 static void show_option_range(struct fio_option *o,
                                int (*logger)(const char *format, ...))
 {
-       if (o->type == FIO_OPT_FLOAT_LIST){
+       if (o->type == FIO_OPT_FLOAT_LIST) {
                if (isnan(o->minfp) && isnan(o->maxfp))
                        return;
 
@@ -356,7 +355,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                           int first, int more, int curr)
 {
        int il, *ilp;
-       doubleflp;
+       double *flp;
        long long ull, *ullp;
        long ul1, ul2;
        double uf;
@@ -479,7 +478,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                                        o->maxlen);
                        return 1;
                }
-               if(!str_to_float(ptr, &uf)){
+               if (!str_to_float(ptr, &uf)) {
                        log_err("not a floating point value: %s\n", ptr);
                        return 1;
                }
@@ -833,9 +832,8 @@ int parse_option(char *opt, const char *input,
                return 1;
        }
 
-       if (!handle_option(*o, post, data)) {
+       if (!handle_option(*o, post, data))
                return 0;
-       }
 
        log_err("fio: failed parsing %s\n", input);
        return 1;
@@ -1049,7 +1047,7 @@ void option_init(struct fio_option *o)
        }
        if (!o->category) {
                log_info("Options %s: no category defined. Setting to misc\n", o->name);
-               o->category = FIO_OPT_G_MISC;
+               o->category = FIO_OPT_C_GENERAL;
        }
 }
 
@@ -1063,8 +1061,11 @@ void options_init(struct fio_option *options)
 
        dprint(FD_PARSE, "init options\n");
 
-       for (o = &options[0]; o->name; o++)
+       for (o = &options[0]; o->name; o++) {
                option_init(o);
+               if (o->inverse)
+                       o->inv_opt = find_option(options, o->inverse);
+       }
 }
 
 void options_free(struct fio_option *options, void *data)