git: fdisk(8): Improve summary show of unintialized disk
Aaron LI
aly at crater.dragonflybsd.org
Thu May 8 22:14:11 PDT 2025
commit 00e1ead7f2c1090e0d54290193f1e2567b1be919
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/00e1ead7f2c1090e0d54290193f1e2567b1be919
--
DragonFly BSD source repository
More information about the Commits
mailing list