Fix target options

This commit is contained in:
Kent Overstreet 2019-01-13 14:15:01 -05:00
parent 6892dcbcc0
commit 5f7dd4b4b2
2 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ int cmd_format(int argc, char *argv[])
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
break; break;
case '?': case '?':
die("unrecognized option %s", optarg); exit(EXIT_FAILURE);
break; break;
} }

View File

@ -15,13 +15,13 @@
struct bch_opt_strs { struct bch_opt_strs {
union { union {
char *by_id[bch2_opts_nr]; char *by_id[bch2_opts_nr];
};
struct { struct {
#define x(_name, ...) char *_name; #define x(_name, ...) char *_name;
BCH_OPTS() BCH_OPTS()
#undef x #undef x
}; };
}; };
};
struct bch_opt_strs bch2_cmdline_opts_get(int *, char *[], unsigned); struct bch_opt_strs bch2_cmdline_opts_get(int *, char *[], unsigned);
struct bch_opts bch2_parse_opts(struct bch_opt_strs); struct bch_opts bch2_parse_opts(struct bch_opt_strs);