summaryrefslogtreecommitdiffstats
path: root/src/genl-ctrl-list.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@redhat.com>2012-04-20 13:18:21 (GMT)
committerThomas Graf <tgraf@redhat.com>2012-04-20 13:18:21 (GMT)
commit073ef6a66ec5c69fc39f39ab11e64147aab554a8 (patch)
treeb66e44c6864ab800018dc7eaae915f74a082b679 /src/genl-ctrl-list.c
parentf54ac3d55f9acc3786369509df1bdff737e6d444 (diff)
downloadlibnl-073ef6a66ec5c69fc39f39ab11e64147aab554a8.zip
libnl-073ef6a66ec5c69fc39f39ab11e64147aab554a8.tar.gz
libnl-073ef6a66ec5c69fc39f39ab11e64147aab554a8.tar.bz2
genl-ctrl-list: Introduce -d|--details as a shortcut for --format=details
Diffstat (limited to 'src/genl-ctrl-list.c')
-rw-r--r--src/genl-ctrl-list.c8
1 files changed, 5 insertions, 3 deletions
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;
}