]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
part_dos: check status flags of partitions
authorDaniel Mack <daniel@caiaq.de>
Mon, 28 Sep 2009 09:40:38 +0000 (11:40 +0200)
committerWolfgang Denk <wd@denx.de>
Sun, 18 Oct 2009 20:50:21 +0000 (22:50 +0200)
Only read partitions which have 0x00 or 0x80 set in their status field.
All others are invalid.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
disk/part_dos.c

index b915eb7484d3f9b8c95553d5fb444c69af95a620..887b75ec8874fb409d08e2c13098fcd3cba9806c 100644 (file)
@@ -188,7 +188,8 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part
                 * fdisk does not show the extended partitions that
                 * are not in the MBR
                 */
-               if ((pt->sys_ind != 0) &&
+               if (((pt->boot_ind & ~0x80) == 0) &&
+                   (pt->sys_ind != 0) &&
                    (part_num == which_part) &&
                    (is_extended(pt->sys_ind) == 0)) {
                        info->blksz = 512;