diff --git a/src/genl-ctrl-list.c b/src/genl-ctrl-list.c index e25eb2a..70c5991 100644 --- a/src/genl-ctrl-list.c +++ b/src/genl-ctrl-list.c @@ -20,10 +20,10 @@ static struct nl_cache *alloc_genl_family_cache(struct nl_sock *sk) static void print_usage(void) { printf( - "Usage: genl-ctrl-list [OPTION]...\n" + "Usage: genl-ctrl-list [--details]\n" "\n" "Options\n" - " -f, --format=TYPE Output format { brief | details | stats }\n" + " -d, --details Include detailed information in the list\n" " -h, --help Show this help\n" " -v, --version Show versioning information\n" ); @@ -46,18 +46,20 @@ int main(int argc, char *argv[]) for (;;) { int c, optidx = 0; static struct option long_opts[] = { + { "details", 0, 0, 'd' }, { "format", 1, 0, 'f' }, { "help", 0, 0, 'h' }, { "version", 0, 0, 'v' }, { 0, 0, 0, 0 } }; - c = getopt_long(argc, argv, "f:hv", long_opts, &optidx); + c = getopt_long(argc, argv, "df:hv", long_opts, &optidx); if (c == -1) break; switch (c) { case 'f': params.dp_type = nl_cli_parse_dumptype(optarg); break; + case 'd': params.dp_type = NL_DUMP_DETAILS; break; case 'h': print_usage(); break; case 'v': nl_cli_print_version(); break; }