summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-09-28 11:40:38 +0200
committerWolfgang Denk <wd@denx.de>2009-10-18 22:50:21 +0200
commit78f4ca7976748159080c9d920d5eb542d1b32d4f (patch)
tree4aa4bef0e7a4683d26ee3432184bb1aceb97eb35
parent45def0ab9d1dedcd2a73939aad8373f760498762 (diff)
downloadu-boot-imx-78f4ca7976748159080c9d920d5eb542d1b32d4f.zip
u-boot-imx-78f4ca7976748159080c9d920d5eb542d1b32d4f.tar.gz
u-boot-imx-78f4ca7976748159080c9d920d5eb542d1b32d4f.tar.bz2
part_dos: check status flags of partitions
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>
-rw-r--r--disk/part_dos.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c
index b915eb7..887b75e 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -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;