* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restore
disk->partiton for safety.
This commit is contained in:
parent
d89ee4141a
commit
a346b81c7d
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-11-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restore
|
||||||
|
disk->partiton for safety.
|
||||||
|
|
||||||
2011-11-12 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-11-12 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
|
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
|
||||||
|
|
|
@ -140,11 +140,17 @@ gpt_partition_map_embed (struct grub_disk *disk, unsigned int *nsectors,
|
||||||
const grub_partition_t p)
|
const grub_partition_t p)
|
||||||
{
|
{
|
||||||
struct grub_gpt_partentry gptdata;
|
struct grub_gpt_partentry gptdata;
|
||||||
|
grub_partition_t p2;
|
||||||
|
|
||||||
|
p2 = disk->partition;
|
||||||
disk->partition = p->parent;
|
disk->partition = p->parent;
|
||||||
if (grub_disk_read (disk, p->offset, p->index,
|
if (grub_disk_read (disk, p->offset, p->index,
|
||||||
sizeof (gptdata), &gptdata))
|
sizeof (gptdata), &gptdata))
|
||||||
|
{
|
||||||
|
disk->partition = p2;
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
disk->partition = p2;
|
||||||
|
|
||||||
/* If there's an embed region, it is in a dedicated partition. */
|
/* If there's an embed region, it is in a dedicated partition. */
|
||||||
if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
|
if (! grub_memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
|
||||||
|
|
Loading…
Add table
Reference in a new issue