X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=disk%2Fpart_dos.c;h=84e672b47b92e23680686833770e87b7a2d86031;hb=95336738f1cf2d4fabfc9bfc4981fa14714efc30;hp=6dd2c2d147d706824afa62364fe182973f93ac09;hpb=3ea0520512089cffbe02b7d6eb645cdfddb09c5c;p=u-boot diff --git a/disk/part_dos.c b/disk/part_dos.c index 6dd2c2d147..84e672b47b 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -20,7 +20,7 @@ #include #include "part_dos.h" -#ifdef HAVE_BLOCK_DEVICE +#ifdef CONFIG_HAVE_BLOCK_DEVICE #define DOS_PART_DEFAULT_SECTOR 512 @@ -90,7 +90,7 @@ static int test_block_type(unsigned char *buffer) static int part_test_dos(struct blk_desc *dev_desc) { #ifndef CONFIG_SPL_BUILD - ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, dev_desc->blksz); + ALLOC_CACHE_ALIGN_BUFFER(legacy_mbr, mbr, 1); if (blk_dread(dev_desc, 0, 1, (ulong *)mbr) != 1) return -1; @@ -220,7 +220,7 @@ static int part_get_info_extended(struct blk_desc *dev_desc, if (((pt->boot_ind & ~0x80) == 0) && (pt->sys_ind != 0) && (part_num == which_part) && - (is_extended(pt->sys_ind) == 0)) { + (ext_part_sector == 0 || is_extended(pt->sys_ind) == 0)) { info->blksz = DOS_PART_DEFAULT_SECTOR; info->start = (lbaint_t)(ext_part_sector + le32_to_int(pt->start4));