[PATCH 2/5] disk: part_dos: Align dos_partition_t with struct partition
Tom Rini
trini at konsulko.com
Tue Jan 20 15:35:52 CET 2026
On Tue, Jan 20, 2026 at 02:36:11PM +0100, Javier Martinez Canillas wrote:
> 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 <javierm at redhat.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260120/9176d69b/attachment.sig>
More information about the U-Boot
mailing list