diff options
author | Phil Blundell <philb@gnu.org> | 1999-04-18 19:41:16 +0000 |
---|---|---|
committer | Phil Blundell <philb@gnu.org> | 1999-04-18 19:41:16 +0000 |
commit | 4ed3f006d1783f162307bdd04fbc9a5822be99fa (patch) | |
tree | 591a0d64d55026b32f77763c18266def9f6a99f5 /ipmaddr.c | |
parent | 9ad2aa12754448fa552fa19c3e15f792d1a56de2 (diff) | |
download | net-tools-4ed3f006d1783f162307bdd04fbc9a5822be99fa.tar.gz net-tools-4ed3f006d1783f162307bdd04fbc9a5822be99fa.tar.bz2 net-tools-4ed3f006d1783f162307bdd04fbc9a5822be99fa.zip |
Add support for `--version'
Diffstat (limited to 'ipmaddr.c')
-rw-r--r-- | ipmaddr.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -44,8 +44,8 @@ char *Release = RELEASE, static void version(void) { - printf("%s\n%s\n%s\n", Release, Version, Signature); - exit(E_VERSION); + printf("%s\n%s\n%s\n", Release, Version, Signature); + exit(E_VERSION); } static void usage(void) __attribute__((noreturn)); @@ -54,6 +54,7 @@ static void usage(void) { fprintf(stderr, _("Usage: ipmaddr [ add | del ] MULTIADDR dev STRING\n")); fprintf(stderr, _(" ipmaddr show [ dev STRING ] [ ipv4 | ipv6 | link | all ]\n")); + fprintf(stderr, _(" ipmaddr -V | -version\n")); exit(-1); } @@ -408,7 +409,7 @@ int main(int argc, char **argv) ++show_stats; } else if (matches(argv[1], "-resolve") == 0) { ++resolve_hosts; - } else if (matches(argv[1], "-V") == 0) { + } else if ((matches(argv[1], "-V") == 0) || matches(argv[1], "--version") == 0) { version(); } else usage(); |