part_dos.h 1017 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * (C) Copyright 2000
  4. * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  5. */
  6. #ifndef _DISK_PART_DOS_H
  7. #define _DISK_PART_DOS_H
  8. #define DOS_PART_DISKSIG_OFFSET 0x1b8
  9. #define DOS_PART_TBL_OFFSET 0x1be
  10. #define DOS_PART_MAGIC_OFFSET 0x1fe
  11. #define DOS_PBR_FSTYPE_OFFSET 0x36
  12. #define DOS_PBR32_FSTYPE_OFFSET 0x52
  13. #define DOS_PBR_MEDIA_TYPE_OFFSET 0x15
  14. #define DOS_MBR 0
  15. #define DOS_PBR 1
  16. typedef struct dos_partition {
  17. unsigned char boot_ind; /* 0x80 - active */
  18. unsigned char head; /* starting head */
  19. unsigned char sector; /* starting sector */
  20. unsigned char cyl; /* starting cylinder */
  21. unsigned char sys_ind; /* What partition type */
  22. unsigned char end_head; /* end head */
  23. unsigned char end_sector; /* end sector */
  24. unsigned char end_cyl; /* end cylinder */
  25. unsigned char start4[4]; /* starting sector counting from 0 */
  26. unsigned char size4[4]; /* nr of sectors in partition */
  27. } dos_partition_t;
  28. #endif /* _DISK_PART_DOS_H */