From: Thomas Weber Date: Wed, 24 Nov 2010 12:07:52 +0000 (+0100) Subject: Common/cmd_nvedit: Check for env subcommand X-Git-Tag: v2010.12-rc2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5904da021449c6d2404485dc1379bf0f3b33414a;p=u-boot Common/cmd_nvedit: Check for env subcommand The env command needs one subcommand. If this is not available print the usage help. Signed-off-by: Thomas Weber --- diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 3fd8abc157..52c5e7c30d 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -848,6 +848,9 @@ static int do_env (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { cmd_tbl_t *cp; + if (argc < 2) + return cmd_usage(cmdtp); + /* drop initial "env" arg */ argc--; argv++;