mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: saveenv: exit on invalid option
@ 2016-09-01  7:33 Enrico Jorns
  2016-09-05  6:25 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Enrico Jorns @ 2016-09-01  7:33 UTC (permalink / raw)
  To: barebox; +Cc: Enrico Jorns

Saveenv should not perform any actions if an invalid parameter was
given.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
---
 commands/saveenv.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 		}
 	}
 
-- 
2.8.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01  7:33 [PATCH] commands: saveenv: exit on invalid option Enrico Jorns
2016-09-05  6:25 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox