CLI_FLAG_QUIET = (1 << 1),
CLI_FLAG_NOCOMMIT = (1 << 2),
CLI_FLAG_BATCH = (1 << 3),
+ CLI_FLAG_SHOW_EXT = (1 << 4),
} flags;
static FILE *input;
struct uci_type_list *ti = type_list;
int maxlen;
- if (!s->anonymous)
+ if (!s->anonymous || !(flags & CLI_FLAG_SHOW_EXT))
return s->e.name;
/* look up in section type list */
"\t-q quiet mode (don't print error messages)\n"
"\t-s force strict mode (stop on parser errors, default)\n"
"\t-S disable strict mode\n"
+ "\t-X do not use extended syntax on 'show'\n"
"\n",
appname
);
int ret;
int c;
+ flags = CLI_FLAG_SHOW_EXT;
appname = argv[0];
input = stdin;
ctx = uci_alloc_context();
return 1;
}
- while((c = getopt(argc, argv, "c:d:f:mnNp:P:sSq")) != -1) {
+ while((c = getopt(argc, argv, "c:d:f:mnNp:P:sSqX")) != -1) {
switch(c) {
case 'c':
uci_set_confdir(ctx, optarg);
case 'q':
flags |= CLI_FLAG_QUIET;
break;
+ case 'X':
+ flags &= ~CLI_FLAG_SHOW_EXT;
+ break;
default:
uci_usage();
return 0;