X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=parse.c;h=3c203121711dcb9595bea3b1b6e517dad3d76abb;hp=90874f1642c792917d4081b73362199337e627b3;hb=cdd18ad87ed9a3639b76c41cfc9682ad7cce652e;hpb=97e8cd444561ef03dd65c6c3c37c934796a4993f diff --git a/parse.c b/parse.c index 90874f16..3c203121 100644 --- a/parse.c +++ b/parse.c @@ -10,6 +10,7 @@ #include #include "parse.h" +#include "debug.h" static int vp_cmp(const void *p1, const void *p2) { @@ -229,6 +230,9 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, char **cp; int ret = 0, is_time = 0; + dprint(FD_PARSE, "__handle_option=%s, type=%d, ptr=%s\n", o->name, + o->type, ptr); + if (!ptr && o->type != FIO_OPT_STR_SET) { fprintf(stderr, "Option %s requires an argument\n", o->name); return 1; @@ -414,6 +418,8 @@ static int handle_option(struct fio_option *o, const char *ptr, void *data) const char *ptr2 = NULL; int r1, r2; + dprint(FD_PARSE, "handle_option=%s, ptr=%s\n", o->name, ptr); + /* * See if we have a second set of parameters, hidden after a comma. * Do this before parsing the first round, to check if we should @@ -661,6 +667,8 @@ void fill_default_options(void *data, struct fio_option *options) { struct fio_option *o; + dprint(FD_PARSE, "filling default options\n"); + for (o = &options[0]; o->name; o++) if (o->def) handle_option(o, o->def, data); @@ -674,6 +682,8 @@ void options_init(struct fio_option *options) { struct fio_option *o; + dprint(FD_PARSE, "init options\n"); + for (o = &options[0]; o->name; o++) { if (o->type == FIO_OPT_BOOL) { o->minval = 0;