summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJaehoon Chung <[email protected]>2021-09-24 09:23:34 +0900
committerJaehoon Chung <[email protected]>2021-10-29 18:22:32 +0900
commit0d453c84bae95174ca3bd94c72a46112580b24c8 (patch)
treed3fd2eb84727bcef0d8a319c620be021960872f4 /cmd
parentf702dc1e1f123e9dcd4048d180cdc33b3f58c62d (diff)
cmd: mmc: check whether card is SD or eMMC before hwpartition
It doesn't need to follow more sequence to do the hwparititioning, because SD doesn't support hwpartitioning feature. Signed-off-by: Jaehoon Chung <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Jaehoon Chung <[email protected]>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mmc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 64e6be72803..96d81ffdf36 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -698,6 +698,11 @@ static int do_mmc_hwpartition(struct cmd_tbl *cmdtp, int flag,
if (!mmc)
return CMD_RET_FAILURE;
+ if (IS_SD(mmc)) {
+ puts("SD doesn't support partitioning\n");
+ return CMD_RET_FAILURE;
+ }
+
if (argc < 1)
return CMD_RET_USAGE;
i = 1;