Remove data member in partition structure

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-07 01:48:38 +01:00
parent 35b86ff407
commit 58548abbc3
8 changed files with 13 additions and 25 deletions

View file

@ -130,17 +130,21 @@ setup (const char *dir,
int NESTED_FUNC_ATTR find_usable_region_gpt (grub_disk_t disk __attribute__ ((unused)),
const grub_partition_t p)
{
struct grub_gpt_partentry *gptdata = p->data;
struct grub_gpt_partentry gptdata;
disk->partition = p->parent;
if (grub_disk_read (disk, p->offset, p->index,
sizeof (gptdata), &gptdata))
return 0;
/* If there's an embed region, it is in a dedicated partition. */
if (! memcmp (&gptdata->type, &grub_gpt_partition_type_bios_boot, 16))
if (! memcmp (&gptdata.type, &grub_gpt_partition_type_bios_boot, 16))
{
embed_region.start = p->start;
embed_region.end = p->start + p->len;
return 1;
}
return 0;
}