Merge tag 'for-linus-20131008' of git://git.infradead.org/linux-mtd
[cascardo/linux.git] / block / partitions / efi.h
index b69ab72..4efcafb 100644 (file)
@@ -37,6 +37,9 @@
 #define EFI_PMBR_OSTYPE_EFI 0xEF
 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
 
+#define GPT_MBR_PROTECTIVE  1
+#define GPT_MBR_HYBRID      2
+
 #define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
 #define GPT_HEADER_REVISION_V1 0x00010000
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1
@@ -101,11 +104,25 @@ typedef struct _gpt_entry {
        efi_char16_t partition_name[72 / sizeof (efi_char16_t)];
 } __attribute__ ((packed)) gpt_entry;
 
+typedef struct _gpt_mbr_record {
+       u8      boot_indicator; /* unused by EFI, set to 0x80 for bootable */
+       u8      start_head;     /* unused by EFI, pt start in CHS */
+       u8      start_sector;   /* unused by EFI, pt start in CHS */
+       u8      start_track;
+       u8      os_type;        /* EFI and legacy non-EFI OS types */
+       u8      end_head;       /* unused by EFI, pt end in CHS */
+       u8      end_sector;     /* unused by EFI, pt end in CHS */
+       u8      end_track;      /* unused by EFI, pt end in CHS */
+       __le32  starting_lba;   /* used by EFI - start addr of the on disk pt */
+       __le32  size_in_lba;    /* used by EFI - size of pt in LBA */
+} __packed gpt_mbr_record;
+
+
 typedef struct _legacy_mbr {
        u8 boot_code[440];
        __le32 unique_mbr_signature;
        __le16 unknown;
-       struct partition partition_record[4];
+       gpt_mbr_record partition_record[4];
        __le16 signature;
 } __attribute__ ((packed)) legacy_mbr;
 
@@ -113,22 +130,3 @@ typedef struct _legacy_mbr {
 extern int efi_partition(struct parsed_partitions *state);
 
 #endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * --------------------------------------------------------------------------
- * Local variables:
- * c-indent-level: 4 
- * c-brace-imaginary-offset: 0
- * c-brace-offset: -4
- * c-argdecl-indent: 4
- * c-label-offset: -4
- * c-continued-statement-offset: 4
- * c-continued-brace-offset: 0
- * indent-tabs-mode: nil
- * tab-width: 8
- * End:
- */