From 748fb60f274b1ba40aa6ed4c4582185aae8f68f7 Mon Sep 17 00:00:00 2001 From: Alexander Korolkov Date: Thu, 12 Mar 2015 13:05:33 +0100 Subject: [PATCH] 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 Signed-off-by: Denys Vlasenko --- networking/arping.c | 3 +-- 1 file changed, 1 insertion(+), 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) // Need to remove SUID_NEVER from applets.h for this to work //xsetuid(getuid()); - err_str = xasprintf("interface %s %%s", device); { unsigned opt; char *str_timeout; @@ -302,7 +301,7 @@ int arping_main(int argc UNUSED_PARAM, char **argv) } target = argv[optind]; - + err_str = xasprintf("interface %s %%s", device); xfunc_error_retval = 2; {