projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49e3803
)
Common/cmd_nvedit: Check for env subcommand
author
Thomas Weber
<weber@corscience.de>
Wed, 24 Nov 2010 12:07:52 +0000
(13:07 +0100)
committer
Wolfgang Denk
<wd@denx.de>
Sat, 27 Nov 2010 22:35:13 +0000
(23:35 +0100)
The env command needs one subcommand. If this is not available
print the usage help.
Signed-off-by: Thomas Weber <weber@corscience.de>
common/cmd_nvedit.c
patch
|
blob
|
history
diff --git
a/common/cmd_nvedit.c
b/common/cmd_nvedit.c
index
3fd8abc
..
52c5e7c
100644
(file)
--- 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++;