projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f01b34a
)
init: allow FIO_OPT_STR_SET options to have an optional argument
author
Jens Axboe
<axboe@kernel.dk>
Wed, 27 Nov 2013 03:19:59 +0000
(20:19 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 27 Nov 2013 03:19:59 +0000
(20:19 -0700)
Makes them work like a bool.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
options.c
patch
|
blob
|
blame
|
history
diff --git
a/options.c
b/options.c
index 4b4c251b92c3e6895d9dafe99c54dc1c9c388147..a700e4da71370838818e755840049f15e08a60f3 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-3277,7
+3277,7
@@
static void add_to_lopt(struct option *lopt, struct fio_option *o,
lopt->name = (char *) name;
lopt->val = val;
if (o->type == FIO_OPT_STR_SET)
lopt->name = (char *) name;
lopt->val = val;
if (o->type == FIO_OPT_STR_SET)
- lopt->has_arg =
no
_argument;
+ lopt->has_arg =
optional
_argument;
else
lopt->has_arg = required_argument;
}
else
lopt->has_arg = required_argument;
}