libsubcmd: Fix OPT_CALLBACK_SET()
[linux-2.6-microblaze.git] / tools / lib / subcmd / parse-options.c
index dbb9efb..39ebf61 100644 (file)
@@ -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)