diff options
author | Denis Vlasenko | 2006-10-26 00:38:22 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-10-26 00:38:22 +0000 |
commit | 940b2e4b734e92cd6dd10c33910439478812d106 (patch) | |
tree | 254eb6f821552461439f41ba869716abbd9c964c /networking/libiproute | |
parent | c6f188def8c5496dbd65c9be6ca3050286db7227 (diff) | |
download | busybox-940b2e4b734e92cd6dd10c33910439478812d106.zip busybox-940b2e4b734e92cd6dd10c33910439478812d106.tar.gz |
ip: "ip addr del" and "ip addr delete" both should work
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/ipaddress.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/networking/libiproute/ipaddress.c b/networking/libiproute/ipaddress.c index 35fd099..fdbe611 100644 --- a/networking/libiproute/ipaddress.c +++ b/networking/libiproute/ipaddress.c @@ -800,7 +800,7 @@ static int ipaddr_modify(int cmd, int argc, char **argv) int do_ipaddr(int argc, char **argv) { static const char *const commands[] = { - "add", "delete", "list", "show", "lst", "flush", 0 + "add", "del", "delete", "list", "show", "lst", "flush", 0 }; int command_num = 2; @@ -811,14 +811,15 @@ int do_ipaddr(int argc, char **argv) switch (command_num) { case 0: /* add */ return ipaddr_modify(RTM_NEWADDR, argc-1, argv+1); - case 1: /* delete */ + case 1: /* del */ + case 2: /* delete */ return ipaddr_modify(RTM_DELADDR, argc-1, argv+1); - case 2: /* list */ - case 3: /* show */ - case 4: /* lst */ + case 3: /* list */ + case 4: /* show */ + case 5: /* lst */ return ipaddr_list_or_flush(argc-1, argv+1, 0); - case 5: /* flush */ + case 6: /* flush */ return ipaddr_list_or_flush(argc-1, argv+1, 1); } - bb_error_msg_and_die("Unknown command %s", *argv); + bb_error_msg_and_die("unknown command %s", *argv); } |