mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 23:23:53 +02:00
SDMMC: restrict the mtdpart_partition to be only used to eMMC-disk
This commit is contained in:
parent
9eab9d3526
commit
ede376e68e
|
|
@ -163,6 +163,11 @@ check_partition(struct gendisk *hd, struct block_device *bdev)
|
|||
sprintf(state->name, "p");
|
||||
|
||||
i = res = err = 0;
|
||||
|
||||
//if the disk is eMMC,then skip directly the check_part to mtdpart_partition; added by xbw, at 2014-03-24
|
||||
if((179 == MAJOR(bdev->bd_dev)&& (1 == hd->emmc_disk)))
|
||||
i=sizeof(check_part)/sizeof(struct parsed_partitions *)-2;
|
||||
|
||||
while (!res && check_part[i]) {
|
||||
memset(state->parts, 0, state->limit * sizeof(state->parts[0]));
|
||||
res = check_part[i++](state);
|
||||
|
|
|
|||
|
|
@ -336,6 +336,10 @@ int mtdpart_partition(struct parsed_partitions *state)
|
|||
|
||||
if(n < SECTOR_1G)
|
||||
return 0;
|
||||
|
||||
//only used to eMMC-disk
|
||||
if(1 != state->bdev->bd_disk->emmc_disk)
|
||||
return 0;
|
||||
|
||||
cmdline = strstr(saved_command_line, "mtdparts=") + 9;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user