summaryrefslogtreecommitdiffstats
path: root/commands/saveenv.c
diff options
context:
space:
mode:
authorEnrico Jorns <ejo@pengutronix.de>2016-09-01 09:33:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-05 08:53:24 +0200
commit958b3a52019ac8e8b54e88bfe4bb23d935b6a7ea (patch)
treedabbab8a8c51575e910058d9e083789ca1291c42 /commands/saveenv.c
parentb65b13745381101cd9e5d34e3663c919502f10e2 (diff)
downloadbarebox-958b3a52019ac8e8b54e88bfe4bb23d935b6a7ea.tar.gz
commands: saveenv: exit on invalid option
Saveenv should not perform any actions if an invalid parameter was given. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/saveenv.c')
-rw-r--r--commands/saveenv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/commands/saveenv.c b/commands/saveenv.c
index 6f210b7..bc1202f 100644
--- a/commands/saveenv.c
+++ b/commands/saveenv.c
@@ -35,6 +35,8 @@ static int do_saveenv(int argc, char *argv[])
case 'z':
envfs_flags |= ENVFS_FLAGS_FORCE_BUILT_IN;
break;
+ default:
+ return COMMAND_ERROR_USAGE;
}
}