summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/ls.c4
1 files changed, 3 insertions, 1 deletions
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;
}