From 6e30461e73d4321864b49fb4cd6238ec9bb1ba75 Mon Sep 17 00:00:00 2001 From: Andreas Henriksson Date: Sat, 19 May 2012 16:08:21 +0200 Subject: [PATCH] iproute2: man page and /bin/ip disagree on del vs delete Reported by Robert Henney: > the 'ip' man page does not mention the command "del" at all but does > claim, "As a rule, it is possible to add, delete and show (or list ) objects". > however, 'ip' does not always recognize "delete" as a commend. > > robh@debian:~$ ip tunnel delete > Command "delete" is unknown, try "ip tunnel help". Lets use "delete" in all calls to matches() for consistency. This will make both "del" and "delete" work everywhere. Signed-off-by: Andreas Henriksson --- ip/ip6tunnel.c | 2 +- ip/ipl2tp.c | 2 +- ip/iptunnel.c | 2 +- ip/iptuntap.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c index d5bee3601..c9720eb25 100644 --- a/ip/ip6tunnel.c +++ b/ip/ip6tunnel.c @@ -408,7 +408,7 @@ int do_ip6tunnel(int argc, char **argv) return do_add(SIOCADDTUNNEL, argc - 1, argv + 1); if (matches(*argv, "change") == 0) return do_add(SIOCCHGTUNNEL, argc - 1, argv + 1); - if (matches(*argv, "del") == 0) + if (matches(*argv, "delete") == 0) return do_del(argc - 1, argv + 1); if (matches(*argv, "show") == 0 || matches(*argv, "lst") == 0 || diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c index c5683f567..3a5f94b17 100644 --- a/ip/ipl2tp.c +++ b/ip/ipl2tp.c @@ -795,7 +795,7 @@ int do_ipl2tp(int argc, char **argv) if (matches(*argv, "add") == 0) return do_add(argc-1, argv+1); - if (matches(*argv, "del") == 0) + if (matches(*argv, "delete") == 0) return do_del(argc-1, argv+1); if (matches(*argv, "show") == 0 || matches(*argv, "lst") == 0 || diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 3d41a274c..38ccd87c7 100644 --- a/ip/iptunnel.c +++ b/ip/iptunnel.c @@ -620,7 +620,7 @@ int do_iptunnel(int argc, char **argv) return do_add(SIOCADDTUNNEL, argc-1, argv+1); if (matches(*argv, "change") == 0) return do_add(SIOCCHGTUNNEL, argc-1, argv+1); - if (matches(*argv, "del") == 0) + if (matches(*argv, "delete") == 0) return do_del(argc-1, argv+1); if (matches(*argv, "show") == 0 || matches(*argv, "lst") == 0 || diff --git a/ip/iptuntap.c b/ip/iptuntap.c index 29f2777e9..20914e114 100644 --- a/ip/iptuntap.c +++ b/ip/iptuntap.c @@ -307,7 +307,7 @@ int do_iptuntap(int argc, char **argv) if (argc > 0) { if (matches(*argv, "add") == 0) return do_add(argc-1, argv+1); - if (matches(*argv, "del") == 0) + if (matches(*argv, "delete") == 0) return do_del(argc-1, argv+1); if (matches(*argv, "show") == 0 || matches(*argv, "lst") == 0 || -- 2.47.2