msdos_partition.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_MSDOS_PARTITION_H
  3. #define _LINUX_MSDOS_PARTITION_H
  4. #define MSDOS_LABEL_MAGIC 0xAA55
  5. struct msdos_partition {
  6. u8 boot_ind; /* 0x80 - active */
  7. u8 head; /* starting head */
  8. u8 sector; /* starting sector */
  9. u8 cyl; /* starting cylinder */
  10. u8 sys_ind; /* What partition type */
  11. u8 end_head; /* end head */
  12. u8 end_sector; /* end sector */
  13. u8 end_cyl; /* end cylinder */
  14. __le32 start_sect; /* starting sector counting from 0 */
  15. __le32 nr_sects; /* nr of sectors in partition */
  16. } __packed;
  17. enum msdos_sys_ind {
  18. /*
  19. * These three have identical behaviour; use the second one if DOS FDISK
  20. * gets confused about extended/logical partitions starting past
  21. * cylinder 1023.
  22. */
  23. DOS_EXTENDED_PARTITION = 5,
  24. LINUX_EXTENDED_PARTITION = 0x85,
  25. WIN98_EXTENDED_PARTITION = 0x0f,
  26. LINUX_DATA_PARTITION = 0x83,
  27. LINUX_LVM_PARTITION = 0x8e,
  28. LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
  29. SOLARIS_X86_PARTITION = 0x82, /* also Linux swap partitions */
  30. NEW_SOLARIS_X86_PARTITION = 0xbf,
  31. DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */
  32. DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */
  33. DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */
  34. EZD_PARTITION = 0x55, /* EZ-DRIVE */
  35. FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */
  36. OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */
  37. NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */
  38. BSDI_PARTITION = 0xb7, /* BSDI Partition ID */
  39. MINIX_PARTITION = 0x81, /* Minix Partition ID */
  40. UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */
  41. };
  42. #endif /* LINUX_MSDOS_PARTITION_H */