diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-04 15:15:07 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-01-04 15:15:24 +0100 |
commit | 8a4cbfb0aaec6f23c576815e467c60f71e1e8e91 (patch) | |
tree | 7aea415416814e87aa902db06649c4a93b43ef50 /commands | |
parent | 64fc4ac1b50a06b17a72c7427e797b3a33a30e8c (diff) | |
download | barebox-8a4cbfb0aaec6f23c576815e467c60f71e1e8e91.tar.gz barebox-8a4cbfb0aaec6f23c576815e467c60f71e1e8e91.tar.xz |
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>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ip-route-get.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/ip-route-get.c b/commands/ip-route-get.c index d393218188..7c304694db 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; } |