diff options
author | Denys Vlasenko | 2015-10-14 13:21:01 +0200 |
---|---|---|
committer | Denys Vlasenko | 2015-10-14 13:21:01 +0200 |
commit | 0f296a3a56b52842057e5a2bc653621a3a6c7bec (patch) | |
tree | c504475cbf18d845698097e6b3b9656e0040d373 /networking/libiproute/iprule.c | |
parent | 69934701fd1b18327b3a779cb292a728834b2d0d (diff) | |
download | busybox-0f296a3a56b52842057e5a2bc653621a3a6c7bec.zip busybox-0f296a3a56b52842057e5a2bc653621a3a6c7bec.tar.gz |
libiproute: rename invarg(a,b) to invarg_1_to_2(a,b)
invarg(a,b) - "invalid argument", but how a and b enter the message?
invarg_1_to_2(a,b) is somewhat easier to read: "invalid argument 'a' to 'b'"
Audit of usage revealed a number of bad uses, with too long messages.
text data bss dec hex filename
938848 932 17448 957228 e9b2c busybox_old
938788 932 17448 957168 e9af0 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute/iprule.c')
-rw-r--r-- | networking/libiproute/iprule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index 774a3e2..c3b2109 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c @@ -214,7 +214,7 @@ static int iprule_modify(int cmd, char **argv) while (*argv) { key = index_in_substrings(keywords, *argv) + 1; if (key == 0) /* no match found in keywords array, bail out. */ - invarg(*argv, applet_name); + invarg_1_to_2(*argv, applet_name); if (key == ARG_from) { inet_prefix dst; NEXT_ARG(); @@ -239,7 +239,7 @@ static int iprule_modify(int cmd, char **argv) uint32_t tos; NEXT_ARG(); if (rtnl_dsfield_a2n(&tos, *argv)) - invarg(*argv, "TOS"); + invarg_1_to_2(*argv, "TOS"); req.r.rtm_tos = tos; } else if (key == ARG_fwmark) { uint32_t fwmark; @@ -250,7 +250,7 @@ static int iprule_modify(int cmd, char **argv) uint32_t realm; NEXT_ARG(); if (get_rt_realms(&realm, *argv)) - invarg(*argv, "realms"); + invarg_1_to_2(*argv, "realms"); addattr32(&req.n, sizeof(req), RTA_FLOW, realm); } else if (key == ARG_table || key == ARG_lookup @@ -258,7 +258,7 @@ static int iprule_modify(int cmd, char **argv) uint32_t tid; NEXT_ARG(); if (rtnl_rttable_a2n(&tid, *argv)) - invarg(*argv, "table ID"); + invarg_1_to_2(*argv, "table ID"); req.r.rtm_table = tid; table_ok = 1; } else if (key == ARG_dev || @@ -281,7 +281,7 @@ static int iprule_modify(int cmd, char **argv) if (key == ARG_help) bb_show_usage(); if (rtnl_rtntype_a2n(&type, *argv)) - invarg(*argv, "type"); + invarg_1_to_2(*argv, "type"); req.r.rtm_type = type; } argv++; @@ -309,7 +309,7 @@ int FAST_FUNC do_iprule(char **argv) if (*argv) { int cmd = index_in_substrings(ip_rule_commands, *argv); if (cmd < 0) - invarg(*argv, applet_name); + invarg_1_to_2(*argv, applet_name); argv++; if (cmd < 2) return iprule_modify((cmd == 0) ? RTM_NEWRULE : RTM_DELRULE, argv); |