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

@ -106,7 +106,6 @@ acorn_partition_map_iterate (grub_disk_t disk,
return err;
part.partmap = &grub_acorn_partition_map;
part.data = 0;
for (i = 0; i != LINUX_MAP_ENTRIES; ++i)
{

View file

@ -99,8 +99,6 @@ amiga_partition_map_iterate (grub_disk_t disk,
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"Amiga partition map not found");
part.data = 0;
/* The end of the partition list is marked using "-1". */
while (next != -1)
{

View file

@ -122,17 +122,16 @@ apple_partition_map_iterate (grub_disk_t disk,
goto fail;
}
part.data = 0;
pos = grub_be_to_cpu16 (aheader.blocksize);
do
{
part.offset = pos / GRUB_DISK_SECTOR_SIZE;
part.index = pos % GRUB_DISK_SECTOR_SIZE;
part.offset = pos / GRUB_DISK_SECTOR_SIZE;
part.index = pos % GRUB_DISK_SECTOR_SIZE;
if (grub_disk_read (disk, part.offset, part.index,
sizeof (struct grub_apple_part), &apart))
return grub_errno;
if (grub_disk_read (disk, part.offset, part.index,
sizeof (struct grub_apple_part), &apart))
return grub_errno;
if (grub_be_to_cpu16 (apart.magic) != GRUB_APPLE_PART_MAGIC)
{

View file

@ -71,15 +71,11 @@ gpt_partition_map_iterate (grub_disk_t disk,
grub_dprintf ("gpt", "Read a valid GPT header\n");
entries = grub_le_to_cpu64 (gpt.partitions);
part.data = grub_malloc (sizeof (entry));
for (i = 0; i < grub_le_to_cpu32 (gpt.maxpart); i++)
{
if (grub_disk_read (disk, entries, last_offset,
sizeof (entry), &entry))
{
grub_free (part.data);
return grub_errno;
}
return grub_errno;
if (grub_memcmp (&grub_gpt_partition_type_empty, &entry.type,
sizeof (grub_gpt_partition_type_empty)))
@ -92,7 +88,6 @@ gpt_partition_map_iterate (grub_disk_t disk,
part.number = i;
part.index = last_offset;
part.partmap = &grub_gpt_partition_map;
grub_memcpy (part.data, &entry, sizeof (entry));
grub_dprintf ("gpt", "GPT entry %d: start=%lld, length=%lld\n", i,
(unsigned long long) part.start,
@ -110,8 +105,6 @@ gpt_partition_map_iterate (grub_disk_t disk,
}
}
grub_free (part.data);
return GRUB_ERR_NONE;
}

View file

@ -40,7 +40,6 @@ pc_partition_map_iterate (grub_disk_t disk,
p.offset = 0;
ext_offset = 0;
p.data = 0;
p.number = -1;
p.partmap = &grub_msdos_partition_map;