]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
authorColin Watson <cjwatson@ubuntu.com>
Tue, 23 Nov 2010 10:48:46 +0000 (10:48 +0000)
committerColin Watson <cjwatson@ubuntu.com>
Tue, 23 Nov 2010 10:48:46 +0000 (10:48 +0000)
Remove byte-swapping function calls, which are not valid in
structure initialisers.
* grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot): Make
non-const.
(GRUB_MOD_INIT): Byte-swap data1, data2, and data3 fields of
grub_gpt_partition_type_bios_boot.

ChangeLog
grub-core/partmap/gpt.c
include/grub/gpt_partition.h

index 03f5f5e19d9c53b51a072aeda646d489c4a1e7a9..815004080f9c546aeaabc5bdcc5d8b9380ff8114 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-23  Colin Watson  <cjwatson@ubuntu.com>
+
+       * include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_BIOS_BOOT):
+       Remove byte-swapping function calls, which are not valid in
+       structure initialisers.
+       * grub-core/partmap/gpt.c (grub_gpt_partition_type_bios_boot): Make
+       non-const.
+       (GRUB_MOD_INIT): Byte-swap data1, data2, and data3 fields of
+       grub_gpt_partition_type_bios_boot.
+
 2010-11-22  Colin Watson  <cjwatson@ubuntu.com>
 
        Fix test program build on GNU/kFreeBSD.
index 7f2c36143bbe95ecd678a85828bce8aaa136922d..13223460b3f4746a802ac6978bf492363bc083ff 100644 (file)
@@ -33,7 +33,7 @@ static grub_uint8_t grub_gpt_magic[8] =
 static const grub_gpt_part_type_t grub_gpt_partition_type_empty = GRUB_GPT_PARTITION_TYPE_EMPTY;
 
 #ifdef GRUB_UTIL
-static const grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
+static grub_gpt_part_type_t grub_gpt_partition_type_bios_boot = GRUB_GPT_PARTITION_TYPE_BIOS_BOOT;
 #endif
 
 /* 512 << 7 = 65536 byte sectors.  */
@@ -198,6 +198,14 @@ static struct grub_partition_map grub_gpt_partition_map =
 GRUB_MOD_INIT(part_gpt)
 {
   grub_partition_map_register (&grub_gpt_partition_map);
+#ifdef GRUB_UTIL
+  grub_gpt_partition_type_bios_boot.data1 =
+    grub_cpu_to_le32 (grub_gpt_partition_type_bios_boot.data1);
+  grub_gpt_partition_type_bios_boot.data2 =
+    grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data2);
+  grub_gpt_partition_type_bios_boot.data3 =
+    grub_cpu_to_le16 (grub_gpt_partition_type_bios_boot.data3);
+#endif
 }
 
 GRUB_MOD_FINI(part_gpt)
index 428ceb16662e18ee7fa65aa976802769f8e41885..bc3d3f21030a6e5fee82005f4c98153b45dff014 100644 (file)
@@ -36,7 +36,7 @@ typedef struct grub_gpt_part_type grub_gpt_part_type_t;
   }
 
 #define GRUB_GPT_PARTITION_TYPE_BIOS_BOOT \
-  { grub_cpu_to_le32 (0x21686148), grub_cpu_to_le16 (0x6449), grub_cpu_to_le16 (0x6e6f), \
+  { 0x21686148, 0x6449, 0x6e6f, \
     { 0x74, 0x4e, 0x65, 0x65, 0x64, 0x45, 0x46, 0x49 } \
   }