summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-01-04 15:15:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-04 15:15:24 +0100
commit8a4cbfb0aaec6f23c576815e467c60f71e1e8e91 (patch)
tree7aea415416814e87aa902db06649c4a93b43ef50
parent64fc4ac1b50a06b17a72c7427e797b3a33a30e8c (diff)
downloadbarebox-8a4cbfb0aaec6f23c576815e467c60f71e1e8e91.tar.gz
net: ip_route_get: Fix error message
We do getopt(), so the next argument is in argv[optind], not in argv[1]. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--commands/ip-route-get.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/ip-route-get.c b/commands/ip-route-get.c
index d393218..7c30469 100644
--- a/commands/ip-route-get.c
+++ b/commands/ip-route-get.c
@@ -42,8 +42,8 @@ static int do_ip_route_get(int argc, char *argv[])
ret = string_to_ip(argv[optind], &ip);
if (ret) {
- printf("Cannot convert %s into a IP address: %s\n",
- argv[1], strerror(-ret));
+ printf("Cannot convert \"%s\" into a IP address: %s\n",
+ argv[optind], strerror(-ret));
return 1;
}