projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[oweals/u-boot.git]
/
common
/
cmd_demo.c
diff --git
a/common/cmd_demo.c
b/common/cmd_demo.c
index bcb34d904569d98612317dcc4e0712db6edd6410..8a10bdf42a8906b9f212fe82c3d42afc79d5c028 100644
(file)
--- a/
common/cmd_demo.c
+++ b/
common/cmd_demo.c
@@
-97,7
+97,9
@@
static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ARRAY_SIZE(demo_commands));
argc -= 2;
argv += 2;
- if (!demo_cmd || argc > demo_cmd->maxargs)
+
+ if ((!demo_cmd || argc > demo_cmd->maxargs) ||
+ ((demo_cmd->name[0] != 'l') && (argc < 1)))
return CMD_RET_USAGE;
if (argc) {