summaryrefslogtreecommitdiff
path: root/include/part_dos.h
AgeCommit message (Collapse)Author
2026-02-15disk: part_dos: Align dos_partition_t with struct partitionJavier Martinez Canillas
The dos_partition_t struct defined in part_dos.h is nearly identical to the struct partition defined in part_efi.h. They differ primarily in how define their starting sector and number of sectors fields. The former uses unsigned char arrays while the latter uses __le32 types. Using __le32 is preferable, as it removes the ambiguity and potential misuse of a raw byte array. This also aligns the structure with how the Linux kernel defines it nowadays, which is the original source of it. To prepare for future consolidation where one of the data structures can be removed, this change aligns both definitions and updates all accessors for dos_partition_t. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2026-02-15disk: part_dos: Move header to the main include directoryJavier Martinez Canillas
There are two different struct definitions for MBR partition table entries: one in part_dos.h and a nearly identical one in part_efi.h. To enable future consolidation of these two structures, move part_dos.h to the main include directory. This makes it accessible from other parts of the codebase, such as part_efi.h, and is the first step toward removing the redundant definition. Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>