summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-07-29 13:40:43 -0400
committerWolfgang Denk <wd@denx.de>2010-09-21 21:37:08 +0200
commite2fad3fce947edf97ff7186bcf36b9adf113ac94 (patch)
tree7ec42c70ab911ee230dbd772c94e180fdbe0f5d1 /common
parent16e66cf194f6d4c748f3c02689e6cd1aa4440c0e (diff)
downloadu-boot-imx-e2fad3fce947edf97ff7186bcf36b9adf113ac94.zip
u-boot-imx-e2fad3fce947edf97ff7186bcf36b9adf113ac94.tar.gz
u-boot-imx-e2fad3fce947edf97ff7186bcf36b9adf113ac94.tar.bz2
cmd_mmc: use common usage function
Rather than using a custom "Usage:", use the common cmd_usage() function, and tail into it now that it returns 1 for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_mmc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c
index 4e7bcdf..4323f76 100644
--- a/common/cmd_mmc.c
+++ b/common/cmd_mmc.c
@@ -178,8 +178,7 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 0:
case 1:
case 4:
- printf("Usage:\n%s\n", cmdtp->usage);
- return 1;
+ return cmd_usage(cmdtp);
case 2:
if (!strcmp(argv[1], "list")) {
@@ -234,10 +233,8 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
printf("%d blocks written: %s\n",
n, (n == cnt) ? "OK" : "ERROR");
return (n == cnt) ? 0 : 1;
- } else {
- printf("Usage:\n%s\n", cmdtp->usage);
- rc = 1;
- }
+ } else
+ rc = cmd_usage(cmdtp);
return rc;
}