summaryrefslogtreecommitdiff
path: root/block/partitions/efi.h
diff options
context:
space:
mode:
authorGideon Israel Dsouza <gidisrael@gmail.com>2014-02-17 19:47:16 +0400
committerJens Axboe <axboe@fb.com>2014-02-19 00:20:01 +0400
commite3ebf0d457039c857dfeb45434e3be9780dea499 (patch)
treebe1abf341e59e52c6cdbc92c5e7af02df6cdc942 /block/partitions/efi.h
parentb4d7124b2f2e29541e5c8815bd84ea55158dd730 (diff)
downloadlinux-e3ebf0d457039c857dfeb45434e3be9780dea499.tar.xz
block: Use macros from compiler.h instead of __attribute__((...))
To increase compiler portability there are several macros defined in <linux/compiler.h> for various gcc __attribute((..)) constructs. I've made sure gcc these specific were replaced with the right macro and an #include <linux/compiler.h> was placed where needed. Signed-off-by: Gideon Israel Dsouza <gidisrael@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/partitions/efi.h')
-rw-r--r--block/partitions/efi.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/block/partitions/efi.h b/block/partitions/efi.h
index 4efcafba7e64..abd0b19288a6 100644
--- a/block/partitions/efi.h
+++ b/block/partitions/efi.h
@@ -32,6 +32,7 @@
#include <linux/major.h>
#include <linux/string.h>
#include <linux/efi.h>
+#include <linux/compiler.h>
#define MSDOS_MBR_SIGNATURE 0xaa55
#define EFI_PMBR_OSTYPE_EFI 0xEF
@@ -87,13 +88,13 @@ typedef struct _gpt_header {
*
* uint8_t reserved2[ BlockSize - 92 ];
*/
-} __attribute__ ((packed)) gpt_header;
+} __packed gpt_header;
typedef struct _gpt_entry_attributes {
u64 required_to_function:1;
u64 reserved:47;
u64 type_guid_specific:16;
-} __attribute__ ((packed)) gpt_entry_attributes;
+} __packed gpt_entry_attributes;
typedef struct _gpt_entry {
efi_guid_t partition_type_guid;
@@ -102,7 +103,7 @@ typedef struct _gpt_entry {
__le64 ending_lba;
gpt_entry_attributes attributes;
efi_char16_t partition_name[72 / sizeof (efi_char16_t)];
-} __attribute__ ((packed)) gpt_entry;
+} __packed gpt_entry;
typedef struct _gpt_mbr_record {
u8 boot_indicator; /* unused by EFI, set to 0x80 for bootable */
@@ -124,7 +125,7 @@ typedef struct _legacy_mbr {
__le16 unknown;
gpt_mbr_record partition_record[4];
__le16 signature;
-} __attribute__ ((packed)) legacy_mbr;
+} __packed legacy_mbr;
/* Functions */
extern int efi_partition(struct parsed_partitions *state);