diff options
author | Thomas Weber <weber@corscience.de> | 2010-11-24 13:07:52 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-11-27 23:35:13 +0100 |
commit | 5904da021449c6d2404485dc1379bf0f3b33414a (patch) | |
tree | 6907c6c786b736cd371746a3c7b9d0896f96d351 /common/cmd_nvedit.c | |
parent | 49e38030fecc1142699034fba0fb06911164170e (diff) |
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 <weber@corscience.de>
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r-- | common/cmd_nvedit.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 3fd8abc157f..52c5e7c30d7 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++; |