projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
libsubcmd: Fix OPT_CALLBACK_SET()
[linux-2.6-microblaze.git]
/
tools
/
lib
/
subcmd
/
parse-options.c
diff --git
a/tools/lib/subcmd/parse-options.c
b/tools/lib/subcmd/parse-options.c
index
dbb9efb
..
39ebf61
100644
(file)
--- a/
tools/lib/subcmd/parse-options.c
+++ b/
tools/lib/subcmd/parse-options.c
@@
-237,6
+237,9
@@
static int get_value(struct parse_opt_ctx_t *p,
return err;
case OPTION_CALLBACK:
+ if (opt->set)
+ *(bool *)opt->set = true;
+
if (unset)
return (*opt->callback)(opt, NULL, 1) ? (-1) : 0;
if (opt->flags & PARSE_OPT_NOARG)