summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-04-08 17:18:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-09 17:00:24 +0200
commit8d0b6dd4103a1ccd9e03c46cb5cbc8daa72b40ca (patch)
tree2bdce0fa84988010e12afa88ed7c89643a415a1b
parent00e4664675d3215c5e5421eaa73195b27be7ba9e (diff)
downloadbarebox-8d0b6dd4103a1ccd9e03c46cb5cbc8daa72b40ca.tar.gz
loadenv: ignore -ENOENT when removing /env
With the -s option loadenv first removes /env. Ignore it when this directory does not exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--commands/loadenv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/loadenv.c b/commands/loadenv.c
index 7b93e86..a39ca8c 100644
--- a/commands/loadenv.c
+++ b/commands/loadenv.c
@@ -80,7 +80,7 @@ static int do_loadenv(int argc, char *argv[])
int ret;
ret = unlink_recursive(dirname, NULL);
- if (ret) {
+ if (ret && ret != -ENOENT) {
eprintf("cannot remove %s: %s\n", dirname,
strerror(-ret));
return 1;