* Private function prototypes
*/
-static int pmbr_part_valid(struct partition *part);
+static int pmbr_part_valid(dos_partition_t *part);
static int is_pmbr_valid(legacy_mbr * mbr);
static int is_gpt_valid(struct blk_desc *desc, u64 lba, gpt_header *pgpt_head,
gpt_entry **pgpt_pte);
*
* Returns: 1 if EFI GPT partition type is found.
*/
-static int pmbr_part_valid(struct partition *part)
+static int pmbr_part_valid(dos_partition_t *part)
{
if (part->sys_ind == EFI_PMBR_OSTYPE_EFI_GPT &&
get_unaligned_le32(&part->start_sect) == 1UL) {
#define _DISK_PART_EFI_H
#include <efi.h>
+#include <part_dos.h>
#define MSDOS_MBR_SIGNATURE 0xAA55
#define MSDOS_MBR_BOOT_CODE_SIZE 440
/* linux/include/efi.h */
typedef u16 efi_char16_t;
-/* based on linux/include/genhd.h */
-struct partition {
- u8 boot_ind; /* 0x80 - active */
- u8 head; /* starting head */
- u8 sector; /* starting sector */
- u8 cyl; /* starting cylinder */
- u8 sys_ind; /* What partition type */
- u8 end_head; /* end head */
- u8 end_sector; /* end sector */
- u8 end_cyl; /* end cylinder */
- __le32 start_sect; /* starting sector counting from 0 */
- __le32 nr_sects; /* nr of sectors in partition */
-} __packed;
-
/* based on linux/fs/partitions/efi.h */
typedef struct _gpt_header {
__le64 signature;
u8 boot_code[MSDOS_MBR_BOOT_CODE_SIZE];
__le32 unique_mbr_signature;
__le16 unknown;
- struct partition partition_record[4];
+ dos_partition_t partition_record[4];
__le16 signature;
} __packed legacy_mbr;
u8 system;
u8 reserved[7];
union {
- struct partition mbr;
+ dos_partition_t mbr;
gpt_entry gpt;
} info;
} __packed;