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>
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")) {
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;
}