projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
deaa1af
)
Revert "parser: get rid of useless is_time variable"
author
Jens Axboe
<jaxboe@fusionio.com>
Thu, 5 May 2011 18:05:10 +0000
(12:05 -0600)
committer
Jens Axboe
<jaxboe@fusionio.com>
Thu, 5 May 2011 18:05:10 +0000
(12:05 -0600)
This reverts commit
1a1137d9ba2603e295aaac579777ab0d3524faa6
.
parse.c
patch
|
blob
|
blame
|
history
diff --git
a/parse.c
b/parse.c
index 585fb7e0ecb1c1b6b5dbd7c5bb65fe4a906837f8..1e6a5224fb4ada8897f2e6e8b901eb5c2c82d256 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-310,7
+310,7
@@
static int __handle_option(struct fio_option *o, const char *ptr, void *data,
long long ull, *ullp;
long ul1, ul2;
char **cp;
long long ull, *ullp;
long ul1, ul2;
char **cp;
- int ret = 0;
+ int ret = 0
, is_time = 0
;
dprint(FD_PARSE, "__handle_option=%s, type=%d, ptr=%s\n", o->name,
o->type, ptr);
dprint(FD_PARSE, "__handle_option=%s, type=%d, ptr=%s\n", o->name,
o->type, ptr);
@@
-358,14
+358,17
@@
static int __handle_option(struct fio_option *o, const char *ptr, void *data,
ret = fn(data, ptr);
break;
}
ret = fn(data, ptr);
break;
}
- case FIO_OPT_STR_VAL_TIME: {
- fio_opt_str_val_fn *fn;
-
- ret = check_str_time(ptr, &ull);
+ case FIO_OPT_STR_VAL_TIME:
+ is_time = 1;
case FIO_OPT_INT:
case FIO_OPT_INT:
- case FIO_OPT_STR_VAL:
+ case FIO_OPT_STR_VAL: {
+ fio_opt_str_val_fn *fn = o->cb;
+
+ if (is_time)
+ ret = check_str_time(ptr, &ull);
+ else
+ ret = check_str_bytes(ptr, &ull, data);
- ret = check_str_bytes(ptr, &ull, data);
if (ret)
break;
if (ret)
break;
@@
-380,7
+383,6
@@
static int __handle_option(struct fio_option *o, const char *ptr, void *data,
return 1;
}
return 1;
}
- fn = o->cb;
if (fn)
ret = fn(data, &ull);
else {
if (fn)
ret = fn(data, &ull);
else {