aboutsummaryrefslogtreecommitdiff
path: root/networking/libiproute/iprule.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-14 13:21:01 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-14 13:21:01 +0200
commit0f296a3a56b52842057e5a2bc653621a3a6c7bec (patch)
treec504475cbf18d845698097e6b3b9656e0040d373 /networking/libiproute/iprule.c
parent69934701fd1b18327b3a779cb292a728834b2d0d (diff)
downloadbusybox-w32-0f296a3a56b52842057e5a2bc653621a3a6c7bec.tar.gz
busybox-w32-0f296a3a56b52842057e5a2bc653621a3a6c7bec.tar.bz2
busybox-w32-0f296a3a56b52842057e5a2bc653621a3a6c7bec.zip
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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c
index 774a3e220..c3b210982 100644
--- a/networking/libiproute/iprule.c
+++ b/networking/libiproute/iprule.c
@@ -214,7 +214,7 @@ static int iprule_modify(int cmd, char **argv)
214 while (*argv) { 214 while (*argv) {
215 key = index_in_substrings(keywords, *argv) + 1; 215 key = index_in_substrings(keywords, *argv) + 1;
216 if (key == 0) /* no match found in keywords array, bail out. */ 216 if (key == 0) /* no match found in keywords array, bail out. */
217 invarg(*argv, applet_name); 217 invarg_1_to_2(*argv, applet_name);
218 if (key == ARG_from) { 218 if (key == ARG_from) {
219 inet_prefix dst; 219 inet_prefix dst;
220 NEXT_ARG(); 220 NEXT_ARG();
@@ -239,7 +239,7 @@ static int iprule_modify(int cmd, char **argv)
239 uint32_t tos; 239 uint32_t tos;
240 NEXT_ARG(); 240 NEXT_ARG();
241 if (rtnl_dsfield_a2n(&tos, *argv)) 241 if (rtnl_dsfield_a2n(&tos, *argv))
242 invarg(*argv, "TOS"); 242 invarg_1_to_2(*argv, "TOS");
243 req.r.rtm_tos = tos; 243 req.r.rtm_tos = tos;
244 } else if (key == ARG_fwmark) { 244 } else if (key == ARG_fwmark) {
245 uint32_t fwmark; 245 uint32_t fwmark;
@@ -250,7 +250,7 @@ static int iprule_modify(int cmd, char **argv)
250 uint32_t realm; 250 uint32_t realm;
251 NEXT_ARG(); 251 NEXT_ARG();
252 if (get_rt_realms(&realm, *argv)) 252 if (get_rt_realms(&realm, *argv))
253 invarg(*argv, "realms"); 253 invarg_1_to_2(*argv, "realms");
254 addattr32(&req.n, sizeof(req), RTA_FLOW, realm); 254 addattr32(&req.n, sizeof(req), RTA_FLOW, realm);
255 } else if (key == ARG_table || 255 } else if (key == ARG_table ||
256 key == ARG_lookup 256 key == ARG_lookup
@@ -258,7 +258,7 @@ static int iprule_modify(int cmd, char **argv)
258 uint32_t tid; 258 uint32_t tid;
259 NEXT_ARG(); 259 NEXT_ARG();
260 if (rtnl_rttable_a2n(&tid, *argv)) 260 if (rtnl_rttable_a2n(&tid, *argv))
261 invarg(*argv, "table ID"); 261 invarg_1_to_2(*argv, "table ID");
262 req.r.rtm_table = tid; 262 req.r.rtm_table = tid;
263 table_ok = 1; 263 table_ok = 1;
264 } else if (key == ARG_dev || 264 } else if (key == ARG_dev ||
@@ -281,7 +281,7 @@ static int iprule_modify(int cmd, char **argv)
281 if (key == ARG_help) 281 if (key == ARG_help)
282 bb_show_usage(); 282 bb_show_usage();
283 if (rtnl_rtntype_a2n(&type, *argv)) 283 if (rtnl_rtntype_a2n(&type, *argv))
284 invarg(*argv, "type"); 284 invarg_1_to_2(*argv, "type");
285 req.r.rtm_type = type; 285 req.r.rtm_type = type;
286 } 286 }
287 argv++; 287 argv++;
@@ -309,7 +309,7 @@ int FAST_FUNC do_iprule(char **argv)
309 if (*argv) { 309 if (*argv) {
310 int cmd = index_in_substrings(ip_rule_commands, *argv); 310 int cmd = index_in_substrings(ip_rule_commands, *argv);
311 if (cmd < 0) 311 if (cmd < 0)
312 invarg(*argv, applet_name); 312 invarg_1_to_2(*argv, applet_name);
313 argv++; 313 argv++;
314 if (cmd < 2) 314 if (cmd < 2)
315 return iprule_modify((cmd == 0) ? RTM_NEWRULE : RTM_DELRULE, argv); 315 return iprule_modify((cmd == 0) ? RTM_NEWRULE : RTM_DELRULE, argv);