[PATCH] commands: saveenv: exit on invalid option
Sascha Hauer
s.hauer at pengutronix.de
Sun Sep 4 23:25:49 PDT 2016
On Thu, Sep 01, 2016 at 09:33:44AM +0200, Enrico Jorns wrote:
> Saveenv should not perform any actions if an invalid parameter was
> given.
>
> Signed-off-by: Enrico Jorns <ejo at pengutronix.de>
> ---
> commands/saveenv.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks
Sascha
>
> 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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list