Merge branch 'jk/prune-optim'
[gitweb.git] / parse-options-cb.c
index e05bcea8096b3e3c507126d19e4a535d316fc179..2733393546d4d4dd9a55c5934531398f4a827ead 100644 (file)
@@ -170,10 +170,12 @@ int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
  * "-h" output even if it's not being handled directly by
  * parse_options().
  */
-int parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx,
-                        const struct option *opt, int unset)
+enum parse_opt_result parse_opt_unknown_cb(struct parse_opt_ctx_t *ctx,
+                                          const struct option *opt,
+                                          const char *arg, int unset)
 {
-       return -2;
+       BUG_ON_OPT_ARG(arg);
+       return PARSE_OPT_UNKNOWN;
 }
 
 /**