diff options
author | Patrick McHardy <kaber@trash.net> | 2013-04-01 11:44:59 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2013-04-01 11:44:59 +0200 |
commit | d2b5cbd88ad9af1fc749b22f19dad9c15d6cbb85 (patch) | |
tree | 8edc879632989f8a5ea1664f03e83f999c8e0efa /src/genl-ctrl-list.c | |
parent | 94cd080452720149008a9c25a9364c5a4d3ccae7 (diff) | |
parent | 6c9be5a31681ddf9a669ecf643092928ab0f2138 (diff) |
Merge git://git.infradead.org/users/tgr/libnl
Signed-off-by: Patrick McHardy <kaber@trash.net>
Conflicts:
include/linux/netlink.h
lib/Makefile.am
lib/error.c
libnl-3.0.pc.in
src/Makefile.am
Diffstat (limited to 'src/genl-ctrl-list.c')
-rw-r--r-- | src/genl-ctrl-list.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/genl-ctrl-list.c b/src/genl-ctrl-list.c index e25eb2a..0895bcc 100644 --- a/src/genl-ctrl-list.c +++ b/src/genl-ctrl-list.c @@ -1,12 +1,12 @@ /* - * src/genl-ctrl-list.c List Generic Netlink Controller + * src/genl-ctrl-list.c List Generic Netlink Families * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 2.1 * of the License. * - * Copyright (c) 2003-2009 Thomas Graf <tgraf@suug.ch> + * Copyright (c) 2003-2012 Thomas Graf <tgraf@suug.ch> */ #include <netlink/cli/utils.h> @@ -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; } |