diff options
author | Tom Rini <trini@ti.com> | 2014-02-05 10:24:19 -0500 |
---|---|---|
committer | Pantelis Antoniou <panto@antoniou-consulting.com> | 2014-02-07 18:17:48 +0200 |
commit | b01e6fe6c89a07ffc28afeeacd21643c1098766c (patch) | |
tree | 098dbbdbb802a187c3e2b9daabd321829e931d9e /common | |
parent | 7dbe63bc950bbd12d021f72bf04104688cd324a9 (diff) | |
download | u-boot-b01e6fe6c89a07ffc28afeeacd21643c1098766c.zip u-boot-b01e6fe6c89a07ffc28afeeacd21643c1098766c.tar.gz u-boot-b01e6fe6c89a07ffc28afeeacd21643c1098766c.tar.bz2 |
cmd_mmc.c: Change 'bootpart' code to match normal coding style
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Tom Rini <trini@ti.com>
Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_mmc.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index da5fef9..e118252 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; |