git: DragonFly_RELEASE_6_4 fdisk(8): Improve summary show of unintialized disk

Aaron LI aly at crater.dragonflybsd.org
Fri May 9 01:03:02 PDT 2025


commit 6e0947fc0d4bb3724adfa3b95d409ffa24fcbb42
Author: Aaron LI <aly at aaronly.me>
Date:   Thu May 8 16:26:24 2025 +0800

    fdisk(8): Improve summary show of unintialized disk
    
    For an unintialized disk, "fdisk -s" would simply exit an error without
    printing any useful information, e.g.,
    
    	# fdisk -s vbd0
    	fdisk: invalid fdisk partition table found
    	fdisk: read_s0: Undefined error: 0
    
    This change makes "fdisk -s" print the geometry of the disk before
    exiting.  In addition, check the "errno" value to avoid the confusing
    "read_s0: Undefined error: 0" message.
    
    Derived from the patch submitted by mikdusan in bug #3369.
    
    Bug: https://bugs.dragonflybsd.org/issues/3369

Summary of changes:
 sbin/fdisk/fdisk.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6e0947fc0d4bb3724adfa3b95d409ffa24fcbb42


-- 
DragonFly BSD source repository


More information about the Commits mailing list