11442f76dSChristoph Hellwig /* SPDX-License-Identifier: GPL-2.0 */ 21442f76dSChristoph Hellwig #ifndef _LINUX_MSDOS_PARTITION_H 31442f76dSChristoph Hellwig #define _LINUX_MSDOS_PARTITION_H 41442f76dSChristoph Hellwig 51442f76dSChristoph Hellwig #define MSDOS_LABEL_MAGIC 0xAA55 61442f76dSChristoph Hellwig 71442f76dSChristoph Hellwig struct msdos_partition { 81442f76dSChristoph Hellwig u8 boot_ind; /* 0x80 - active */ 91442f76dSChristoph Hellwig u8 head; /* starting head */ 101442f76dSChristoph Hellwig u8 sector; /* starting sector */ 111442f76dSChristoph Hellwig u8 cyl; /* starting cylinder */ 121442f76dSChristoph Hellwig u8 sys_ind; /* What partition type */ 131442f76dSChristoph Hellwig u8 end_head; /* end head */ 141442f76dSChristoph Hellwig u8 end_sector; /* end sector */ 151442f76dSChristoph Hellwig u8 end_cyl; /* end cylinder */ 161442f76dSChristoph Hellwig __le32 start_sect; /* starting sector counting from 0 */ 171442f76dSChristoph Hellwig __le32 nr_sects; /* nr of sectors in partition */ 181442f76dSChristoph Hellwig } __packed; 191442f76dSChristoph Hellwig 200226e9eaSChristoph Hellwig enum msdos_sys_ind { 210226e9eaSChristoph Hellwig /* 220226e9eaSChristoph Hellwig * These three have identical behaviour; use the second one if DOS FDISK 230226e9eaSChristoph Hellwig * gets confused about extended/logical partitions starting past 240226e9eaSChristoph Hellwig * cylinder 1023. 250226e9eaSChristoph Hellwig */ 260226e9eaSChristoph Hellwig DOS_EXTENDED_PARTITION = 5, 270226e9eaSChristoph Hellwig LINUX_EXTENDED_PARTITION = 0x85, 280226e9eaSChristoph Hellwig WIN98_EXTENDED_PARTITION = 0x0f, 290226e9eaSChristoph Hellwig 300226e9eaSChristoph Hellwig LINUX_DATA_PARTITION = 0x83, 310226e9eaSChristoph Hellwig LINUX_LVM_PARTITION = 0x8e, 320226e9eaSChristoph Hellwig LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ 330226e9eaSChristoph Hellwig 34*cb0ab526SChristoph Hellwig SOLARIS_X86_PARTITION = 0x82, /* also Linux swap partitions */ 350226e9eaSChristoph Hellwig NEW_SOLARIS_X86_PARTITION = 0xbf, 360226e9eaSChristoph Hellwig 370226e9eaSChristoph Hellwig DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */ 380226e9eaSChristoph Hellwig DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */ 390226e9eaSChristoph Hellwig DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */ 400226e9eaSChristoph Hellwig EZD_PARTITION = 0x55, /* EZ-DRIVE */ 410226e9eaSChristoph Hellwig 420226e9eaSChristoph Hellwig FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */ 430226e9eaSChristoph Hellwig OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */ 440226e9eaSChristoph Hellwig NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */ 450226e9eaSChristoph Hellwig BSDI_PARTITION = 0xb7, /* BSDI Partition ID */ 460226e9eaSChristoph Hellwig MINIX_PARTITION = 0x81, /* Minix Partition ID */ 470226e9eaSChristoph Hellwig UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */ 480226e9eaSChristoph Hellwig }; 490226e9eaSChristoph Hellwig 501442f76dSChristoph Hellwig #endif /* LINUX_MSDOS_PARTITION_H */ 51