return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 1,
&grub_bsdlabel_partition_map, hook, hook_data);
- if (disk->partition
+ if (disk->partition
&& (grub_strcmp (disk->partition->partmap->name, "msdos") == 0
|| disk->partition->partmap == &grub_bsdlabel_partition_map
|| disk->partition->partmap == &grub_netbsdlabel_partition_map
|| disk->partition->partmap == &grub_openbsdlabel_partition_map))
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no embedding supported");
- return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0,
+ return iterate_real (disk, GRUB_PC_PARTITION_BSD_LABEL_SECTOR, 0,
&grub_bsdlabel_partition_map, hook, hook_data);
}
{
grub_uint32_t length;
grub_uint32_t start;
- grub_uint32_t type;
+ grub_uint32_t type;
} GRUB_PACKED;
struct grub_dvh_block
if (! grub_dvh_is_valid (block.raw))
return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
-
+
/* Maybe another error value would be better, because partition
table _is_ recognized but invalid. */
for (partnum = 0; partnum < ARRAY_SIZE (block.dvh.parts); partnum++)
" avoiding it. "
"This software may cause boot or other problems in "
"future. Please ask its authors not to store data "
- "in the boot track")
+ "in the boot track")
};
if (grub_msdos_partition_is_extended (e->type))
{
- offset = ext_offset
+ offset = ext_offset
+ ((grub_disk_addr_t)grub_le_to_cpu32 (e->start)
<< (disk->log_sector_size - GRUB_DISK_SECTOR_BITS));
if (! ext_offset)
if (! grub_sun_is_valid (block.raw))
return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
-
+
/* Maybe another error value would be better, because partition
table _is_ recognized but invalid. */
for (partnum = 0; partnum < GRUB_PARTMAP_SUN_MAX_PARTS; partnum++)
grub_free (p);
return err;
}
-
+
if (GRUB_PARTMAP_SUN_PC_MAGIC != grub_le_to_cpu16 (block.sun_block.magic))
{
grub_free (p);
- return grub_error (GRUB_ERR_BAD_PART_TABLE,
+ return grub_error (GRUB_ERR_BAD_PART_TABLE,
"not a sun_pc partition table");
}