We do getopt(), so the next argument is in argv[optind], not in argv[1]. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- commands/ip-route-get.c | 4 ++-- 1 file 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; } -- 2.19.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox