summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharles.park <charles.park@hardkernel.com>2017-08-10 09:50:06 +0300
committercodewalker <codewalker@hardkernel.com>2017-08-10 10:49:48 +0300
commitd6a572def2e9d3d4a4e6518c1148241af22d95df (patch)
treea4850255ddec6e2b3171745e783e8dfb019a2948
parented7845630ccdf74938e98d8e54c6d3581c4341fd (diff)
downloadu-boot-d6a572def2e9d3d4a4e6518c1148241af22d95df.tar.xz
ODROID-XU4 : fdisk option error fix.
Change-Id: I63f05c644710016116006db62ee22b59393e5d06
-rwxr-xr-xcmd/mmc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 9372ec1b66..491eec040f 100755
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -1444,16 +1444,15 @@ static int create_mmc_fdisk(int argc, char * const argv[])
static int do_fdisk(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- if (argv[2][0] != '0' && argv[2][0] != '1') {
- printf("Error :");
- printf("Wrong device number\n");
- return CMD_RET_FAILURE;
- }
-
switch (argc) {
default :
break;
case 3: case 6: case 7:
+ if (argv[2][0] != '0' && argv[2][0] != '1') {
+ printf("Error :");
+ printf("Wrong device number\n");
+ return CMD_RET_FAILURE;
+ }
if (argv[1][1] == 'c')
create_mmc_fdisk(argc, argv);
if (argv[1][1] == 'c' || argv[1][1] == 'p') {