Add some handy defines for some hardcoded magic numbers related to
extended partition handling.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
static inline int is_extended(int part_type)
{
- return (part_type == 0x5 ||
- part_type == 0xf ||
- part_type == 0x85);
+ return (part_type == DOS_PART_TYPE_EXTENDED ||
+ part_type == DOS_PART_TYPE_EXTENDED_LBA ||
+ part_type == DOS_PART_TYPE_EXTENDED_LINUX);
}
static int get_bootable(dos_partition_t *p)
#define DOS_PBR_MEDIA_TYPE_OFFSET 0x15
#define DOS_MBR 0
#define DOS_PBR 1
+#define DOS_PART_TYPE_EXTENDED 0x05
+#define DOS_PART_TYPE_EXTENDED_LBA 0x0F
+#define DOS_PART_TYPE_EXTENDED_LINUX 0x85
typedef struct dos_partition {
unsigned char boot_ind; /* 0x80 - active */