git: gpt(8): Reuse 'struct dos_partition' from <sys/diskmbr.h>

Aaron LI aly at crater.dragonflybsd.org
Wed Feb 18 06:32:38 PST 2026


commit 0e427f7404cd7569572e7f16d494ab149bcee184
Author: Aaron LI <aly at aaronly.me>
Date:   Fri Aug 29 06:39:27 2025 +0800

    gpt(8): Reuse 'struct dos_partition' from <sys/diskmbr.h>
    
    Note that 'struct dos_partition' uses 'uint32_t' for dp_start/dp_size
    fields, so the struct has an alignment size of 4 bytes.  Therefore, we
    need to add the '__packed' to 'struct mbr' to avoid the paddings.

Summary of changes:
 sbin/gpt/boot.c    | 23 ++++++++++-------------
 sbin/gpt/create.c  | 30 +++++++++++++-----------------
 sbin/gpt/expand.c  | 11 ++++-------
 sbin/gpt/gpt.c     | 21 +++++++++------------
 sbin/gpt/gpt.h     | 27 +++++++--------------------
 sbin/gpt/migrate.c | 38 ++++++++++++++++----------------------
 sbin/gpt/show.c    | 13 +++++--------
 7 files changed, 64 insertions(+), 99 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0e427f7404cd7569572e7f16d494ab149bcee184


-- 
DragonFly BSD source repository


More information about the Commits mailing list