[PATCH v2 2/7] disk: part_dos: Align dos_partition_t with struct partition

Tom Rini trini at konsulko.com
Fri Feb 13 15:43:50 CET 2026


On Fri, Feb 13, 2026 at 10:41:08AM +0200, Ilias Apalodimas wrote:
> Hi Javier
> 
> [...]
> 
> >         unsigned char end_head;         /* end head                             */
> >         unsigned char end_sector;       /* end sector                           */
> >         unsigned char end_cyl;          /* end cylinder                         */
> > -       unsigned char start4[4];        /* starting sector counting from 0      */
> > -       unsigned char size4[4];         /* nr of sectors in partition           */
> > -} dos_partition_t;
> > +       __le32 start_sect;              /* starting sector counting from 0      */
> > +       __le32 nr_sects;                /* nr of sectors in partition           */
> > +} __packed dos_partition_t;
> 
> This always has to be packed and the part_dos.h definition had this
> wrong all along?

I believe that's what we found as part of v1, yes. Or at least the linux
kernel has always packed it?

-- 
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/20260213/0e46343d/attachment.sig>


More information about the U-Boot mailing list