partitions: read whole sector with EFI GPT header
[pandora-kernel.git] / fs / partitions / efi.h
index 2cc89d0..6998b58 100644 (file)
@@ -37,7 +37,6 @@
 #define EFI_PMBR_OSTYPE_EFI 0xEF
 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
 
-#define GPT_BLOCK_SIZE 512
 #define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
 #define GPT_HEADER_REVISION_V1 0x00010000
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1
@@ -79,7 +78,12 @@ typedef struct _gpt_header {
        __le32 num_partition_entries;
        __le32 sizeof_partition_entry;
        __le32 partition_entry_array_crc32;
-       u8 reserved2[GPT_BLOCK_SIZE - 92];
+
+       /* The rest of the logical block is reserved by UEFI and must be zero.
+        * EFI standard handles this by:
+        *
+        * uint8_t              reserved2[ BlockSize - 92 ];
+        */
 } __attribute__ ((packed)) gpt_header;
 
 typedef struct _gpt_entry_attributes {