Print this page
grub patch
*** 72,82 ****
const grub_partition_t partition))
{
grub_partition_t p;
union
{
! struct grub_sun_pc_block sun;
grub_uint16_t raw[0];
} block;
int partnum;
grub_err_t err;
--- 72,82 ----
const grub_partition_t partition))
{
grub_partition_t p;
union
{
! struct grub_sun_pc_block sunb;
grub_uint16_t raw[0];
} block;
int partnum;
grub_err_t err;
*** 90,100 ****
{
grub_free (p);
return err;
}
! if (GRUB_PARTMAP_SUN_PC_MAGIC != grub_le_to_cpu16 (block.sun.magic))
{
grub_free (p);
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"not a sun_pc partition table");
}
--- 90,100 ----
{
grub_free (p);
return err;
}
! if (GRUB_PARTMAP_SUN_PC_MAGIC != grub_le_to_cpu16 (block.sunb.magic))
{
grub_free (p);
return grub_error (GRUB_ERR_BAD_PART_TABLE,
"not a sun_pc partition table");
}
*** 109,124 ****
table _is_ recognized but invalid. */
for (partnum = 0; partnum < GRUB_PARTMAP_SUN_PC_MAX_PARTS; partnum++)
{
struct grub_sun_pc_partition_descriptor *desc;
! if (block.sun.partitions[partnum].id == 0
! || block.sun.partitions[partnum].id
== GRUB_PARTMAP_SUN_PC_WHOLE_DISK_ID)
continue;
! desc = &block.sun.partitions[partnum];
p->start = grub_le_to_cpu32 (desc->start_sector);
p->len = grub_le_to_cpu32 (desc->num_sectors);
p->number = partnum;
if (p->len)
{
--- 109,124 ----
table _is_ recognized but invalid. */
for (partnum = 0; partnum < GRUB_PARTMAP_SUN_PC_MAX_PARTS; partnum++)
{
struct grub_sun_pc_partition_descriptor *desc;
! if (block.sunb.partitions[partnum].id == 0
! || block.sunb.partitions[partnum].id
== GRUB_PARTMAP_SUN_PC_WHOLE_DISK_ID)
continue;
! desc = &block.sunb.partitions[partnum];
p->start = grub_le_to_cpu32 (desc->start_sector);
p->len = grub_le_to_cpu32 (desc->num_sectors);
p->number = partnum;
if (p->len)
{