int c;
uintmax_t offset = 0, size = 0;
- enum {
- EXCL_NONE,
- EXCL_NAMES,
- EXCL_USAGE
+ static const ul_excl_t excl[] = { /* rows and cols in in ASCII order */
+ { 'n','u' },
+ { 0 }
};
- int excl_opt = EXCL_NONE;
+ int excl_st[ARRAY_SIZE(excl)] = UL_EXCL_STATUS_INIT;
show[0] = NULL;
atexit(close_stdout);
- while ((c = getopt (argc, argv, "c:df:ghilL:n:ko:O:ps:S:t:u:U:w:v")) != EOF)
+ while ((c = getopt (argc, argv,
+ "c:df:ghilL:n:ko:O:ps:S:t:u:U:w:v")) != EOF) {
+
+ err_exclusive_options(c, NULL, excl, excl_st);
+
switch (c) {
case 'c':
if (optarg && !*optarg)
search_type = strdup("LABEL");
break;
case 'n':
- exclusive_option(&excl_opt, EXCL_NAMES, "-{u,n}");
fltr_type = list_to_types(optarg, &fltr_flag);
break;
case 'u':
- exclusive_option(&excl_opt, EXCL_USAGE, "-{u,n}");
fltr_usage = list_to_usage(optarg, &fltr_flag);
break;
case 'U':
default:
usage(err);
}
+ }
/* The rest of the args are device names */