summaryrefslogtreecommitdiffstats
path: root/commands/ls.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-10-13 09:13:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2009-10-13 09:13:18 +0200
commite06a09be5bbbf972f0a772c29691e91799f0c620 (patch)
tree5d0520471eca0eb7eb6b52bb3b300491c9456d22 /commands/ls.c
parent0c456637989c393143c8a7c2a9ed60d92b3c5384 (diff)
downloadbarebox-e06a09be5bbbf972f0a772c29691e91799f0c620.tar.gz
ls: fix stat failure, print error
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/ls.c')
-rw-r--r--commands/ls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/ls.c b/commands/ls.c
index 112e124..85fe8b5 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;
}