From: Tom Rini Date: Wed, 5 Feb 2014 15:24:19 +0000 (-0500) Subject: cmd_mmc.c: Change 'bootpart' code to match normal coding style X-Git-Tag: v2014.04-rc1~79^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b01e6fe6c89a07ffc28afeeacd21643c1098766c;p=oweals%2Fu-boot.git cmd_mmc.c: Change 'bootpart' code to match normal coding style Acked-by: Jaehoon Chung Signed-off-by: Tom Rini Signed-off-by: Pantelis Antoniou --- diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index da5fef9db9..e118252394 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -314,11 +314,18 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } else if (strcmp(argv[1], "bootpart") == 0) { int dev; - dev = simple_strtoul(argv[2], NULL, 10); + struct *mmc; + u32 bootsize, rpmbsize; - u32 bootsize = simple_strtoul(argv[3], NULL, 10); - u32 rpmbsize = simple_strtoul(argv[4], NULL, 10); - struct mmc *mmc = find_mmc_device(dev); + if (argc == 5) { + dev = simple_strtoul(argv[2], NULL, 10); + bootsize = simple_strtoul(argv[3], NULL, 10); + rpmbsize = simple_strtoul(argv[4], NULL, 10); + } else { + return CMD_RET_USAGE; + } + + mmc = find_mmc_device(dev); if (!mmc) { printf("no mmc device at slot %x\n", dev); return 1;