git: kernel: Fix GPT partition start/end check in gptinit()

Aaron LI aly at crater.dragonflybsd.org
Tue Sep 2 05:14:34 PDT 2025


commit 40e87075579c237d62687f357c6fa0505f4f9f08
Author: Aaron LI <aly at aaronly.me>
Date:   Sun Aug 31 16:14:03 2025 +0800

    kernel: Fix GPT partition start/end check in gptinit()
    
    The GPT partition ending LBA is inclusive, so it's valid to have a GPT
    partition with start == end, i.e., the partition size is 1 block.  Fix
    gptinit() to support this case.  In addition, improve the kprintf()
    debug message to show the value of start and ending LBAs.

Summary of changes:
 sys/kern/subr_diskgpt.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/40e87075579c237d62687f357c6fa0505f4f9f08


-- 
DragonFly BSD source repository


More information about the Commits mailing list