X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=block%2Fpartitions%2Fcheck.c;h=b7c76e4da75f932ccbed59fe04a102774bf54a00;hb=e82146650ea5de8205f8890eaf4cb98615c51d9a;hp=19ba207ea7d12de48ae0a6182c71df3d188c2b3a;hpb=0aefda3e8188ad71168bd32152d41b3d72f04087;p=firefly-linux-kernel-4.4.55.git diff --git a/block/partitions/check.c b/block/partitions/check.c old mode 100644 new mode 100755 index 19ba207ea7d1..b7c76e4da75f --- a/block/partitions/check.c +++ b/block/partitions/check.c @@ -19,7 +19,6 @@ #include #include "check.h" - #include "acorn.h" #include "amiga.h" #include "atari.h" @@ -34,6 +33,8 @@ #include "efi.h" #include "karma.h" #include "sysv68.h" +#include "rk.h" +#include "cmdline.h" int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/ @@ -65,6 +66,9 @@ static int (*check_part[])(struct parsed_partitions *) = { adfspart_check_ADFS, #endif +#ifdef CONFIG_CMDLINE_PARTITION + cmdline_partition, +#endif #ifdef CONFIG_EFI_PARTITION efi_partition, /* this must come before msdos */ #endif @@ -104,6 +108,10 @@ static int (*check_part[])(struct parsed_partitions *) = { #ifdef CONFIG_SYSV68_PARTITION sysv68_partition, #endif +#ifdef CONFIG_RK_PARTITION + rkpart_partition, +#endif + NULL }; @@ -157,6 +165,13 @@ check_partition(struct gendisk *hd, struct block_device *bdev) sprintf(state->name, "p"); i = res = err = 0; + + /* Rockchip partition table ONLY used by eMMC disk */ + #ifdef CONFIG_RK_PARTITION + if ((179 == MAJOR(bdev->bd_dev) && (1 == hd->emmc_disk))) + i = sizeof(check_part) / sizeof(struct parsed_partitions *) - 2; + #endif + while (!res && check_part[i]) { memset(state->parts, 0, state->limit * sizeof(state->parts[0])); res = check_part[i++](state);