aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Korolkov <alexander.korolkov@gmail.com>2015-03-12 13:05:33 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2015-03-12 13:05:33 +0100
commit748fb60f274b1ba40aa6ed4c4582185aae8f68f7 (patch)
treecfa30344f655cdaed0706982de166ef885342e42
parentfe8b5802bafb7bce7af525237d1195a91a3e4af4 (diff)
downloadbusybox-w32-748fb60f274b1ba40aa6ed4c4582185aae8f68f7.tar.gz
busybox-w32-748fb60f274b1ba40aa6ed4c4582185aae8f68f7.tar.bz2
busybox-w32-748fb60f274b1ba40aa6ed4c4582185aae8f68f7.zip
arping: fix iface name in error messages
arping: interface eth0 not found: No such device ^^^^ This is because error template is formed before parsing command line arguments, so it always uses default interface name "eth0". Signed-off-by: Alexander Korolkov <alexander.korolkov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--networking/arping.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/arping.c b/networking/arping.c
index a4421edcb..dbfd75ef5 100644
--- a/networking/arping.c
+++ b/networking/arping.c
@@ -284,7 +284,6 @@ int arping_main(int argc UNUSED_PARAM, char **argv)
284 // Need to remove SUID_NEVER from applets.h for this to work 284 // Need to remove SUID_NEVER from applets.h for this to work
285 //xsetuid(getuid()); 285 //xsetuid(getuid());
286 286
287 err_str = xasprintf("interface %s %%s", device);
288 { 287 {
289 unsigned opt; 288 unsigned opt;
290 char *str_timeout; 289 char *str_timeout;
@@ -302,7 +301,7 @@ int arping_main(int argc UNUSED_PARAM, char **argv)
302 } 301 }
303 302
304 target = argv[optind]; 303 target = argv[optind];
305 304 err_str = xasprintf("interface %s %%s", device);
306 xfunc_error_retval = 2; 305 xfunc_error_retval = 2;
307 306
308 { 307 {