* grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Accept

protective entry in any slot.
	* grub-core/partmap/msdos.c (grub_partition_msdos_iterate): Reject
	if protective entry is found in any slot.

	Protective entry in non-first slot make no sense but is a widespread
	brain damage.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-05-22 09:09:00 +02:00
parent 4cf6be1bd9
commit 13c6353fc7
3 changed files with 20 additions and 5 deletions

View file

@ -69,7 +69,10 @@ grub_gpt_partition_map_iterate (grub_disk_t disk,
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no signature");
/* Make sure the MBR is a protective MBR and not a normal MBR. */
if (mbr.entries[0].type != GRUB_PC_PARTITION_TYPE_GPT_DISK)
for (i = 0; i < 4; i++)
if (mbr.entries[i].type == GRUB_PC_PARTITION_TYPE_GPT_DISK)
break;
if (i == 4)
return grub_error (GRUB_ERR_BAD_PART_TABLE, "no GPT partition map found");
/* Read the GPT header. */