]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
cmd_mmc: use common usage function
authorMike Frysinger <vapier@gentoo.org>
Thu, 29 Jul 2010 17:40:43 +0000 (13:40 -0400)
committerWolfgang Denk <wd@denx.de>
Tue, 21 Sep 2010 19:37:08 +0000 (21:37 +0200)
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>
common/cmd_mmc.c

index 4e7bcdf82a528cd96b49a259fa54cef5432da453..4323f76b30549cb0a83b19c8c95b755259d2af14 100644 (file)
@@ -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;
        }