diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-13 09:13:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-13 09:13:18 +0200 |
commit | e06a09be5bbbf972f0a772c29691e91799f0c620 (patch) | |
tree | 5d0520471eca0eb7eb6b52bb3b300491c9456d22 /commands | |
parent | 0c456637989c393143c8a7c2a9ed60d92b3c5384 (diff) | |
download | barebox-e06a09be5bbbf972f0a772c29691e91799f0c620.tar.gz barebox-e06a09be5bbbf972f0a772c29691e91799f0c620.tar.xz |
ls: fix stat failure, print error
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/ls.c | 4 |
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; } |