From e06a09be5bbbf972f0a772c29691e91799f0c620 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 13 Oct 2009 09:13:18 +0200 Subject: ls: fix stat failure, print error Signed-off-by: Sascha Hauer --- commands/ls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'commands/ls.c') diff --git a/commands/ls.c b/commands/ls.c index 112e1245a3..85fe8b53f4 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -150,7 +150,9 @@ static int do_ls (cmd_tbl_t *cmdtp, int argc, char *argv[]) while (o < argc) { ret = stat(argv[o], &s); if (ret) { - optind++; + printf("%s: %s: %s\n", argv[0], + argv[o], errno_str()); + o++; continue; } -- cgit v1.2.3