Print this page
grub patch

@@ -90,11 +90,11 @@
                                         const grub_partition_t partition))
 {
   struct grub_partition p;
   union
   {
-    struct grub_sun_block sun;
+    struct grub_sun_block sunb;
     grub_uint16_t raw[0];
   } block;
   int partnum;
   grub_err_t err;
 

@@ -102,11 +102,11 @@
   err = grub_disk_read (disk, 0, 0, sizeof (struct grub_sun_block),
                         &block);
   if (err)
     return err;
 
-  if (GRUB_PARTMAP_SUN_MAGIC != grub_be_to_cpu16 (block.sun.magic))
+  if (GRUB_PARTMAP_SUN_MAGIC != grub_be_to_cpu16 (block.sunb.magic))
     return grub_error (GRUB_ERR_BAD_PART_TABLE, "not a sun partition table");
 
   if (! grub_sun_is_valid (block.raw))
       return grub_error (GRUB_ERR_BAD_PART_TABLE, "invalid checksum");
   

@@ -114,18 +114,18 @@
      table _is_ recognized but invalid.  */
   for (partnum = 0; partnum < GRUB_PARTMAP_SUN_MAX_PARTS; partnum++)
     {
       struct grub_sun_partition_descriptor *desc;
 
-      if (block.sun.infos[partnum].id == 0
-          || block.sun.infos[partnum].id == GRUB_PARTMAP_SUN_WHOLE_DISK_ID)
+      if (block.sunb.infos[partnum].id == 0
+          || block.sunb.infos[partnum].id == GRUB_PARTMAP_SUN_WHOLE_DISK_ID)
         continue;
 
-      desc = &block.sun.partitions[partnum];
+      desc = &block.sunb.partitions[partnum];
       p.start = ((grub_uint64_t) grub_be_to_cpu32 (desc->start_cylinder)
-                  * grub_be_to_cpu16 (block.sun.ntrks)
-                  * grub_be_to_cpu16 (block.sun.nsect));
+                  * grub_be_to_cpu16 (block.sunb.ntrks)
+                  * grub_be_to_cpu16 (block.sunb.nsect));
       p.len = grub_be_to_cpu32 (desc->num_sectors);
       p.number = p.index = partnum;
       if (p.len)
         {
           if (hook (disk, &p))