projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into gfio
[fio.git]
/
parse.c
diff --git
a/parse.c
b/parse.c
index c1fed56ad2e51ae80c9f1aa76fe25001303f5bd8..631701363f13a14989554b4cb9f1f38c7d3bee29 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-16,7
+16,6
@@
#include "options.h"
static struct fio_option *__fio_options;
#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)
{
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, ...))
{
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;
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;
int first, int more, int curr)
{
int il, *ilp;
- double
*
flp;
+ double
*
flp;
long long ull, *ullp;
long ul1, ul2;
double uf;
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;
}
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;
}
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;
}
return 1;
}
- if (!handle_option(*o, post, data))
{
+ if (!handle_option(*o, post, data))
return 0;
return 0;
- }
log_err("fio: failed parsing %s\n", input);
return 1;
log_err("fio: failed parsing %s\n", input);
return 1;
@@
-1063,8
+1061,11
@@
void options_init(struct fio_option *options)
dprint(FD_PARSE, "init options\n");
dprint(FD_PARSE, "init options\n");
- for (o = &options[0]; o->name; o++)
+ for (o = &options[0]; o->name; o++)
{
option_init(o);
option_init(o);
+ if (o->inverse)
+ o->inv_opt = find_option(options, o->inverse);
+ }
}
void options_free(struct fio_option *options, void *data)
}
void options_free(struct fio_option *options, void *data)