Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2026 01:33:57 +0000
From:      Alexander Ziaee <ziaee@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 240c22909a06 - stable/15 - diskinfo: Align and alphabetize options
Message-ID:  <69e03c85.479dc.6b9e02b4@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=240c22909a06d8b3d52fbc6d00bcf27fe9a1dc02

commit 240c22909a06d8b3d52fbc6d00bcf27fe9a1dc02
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2026-04-13 01:59:33 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2026-04-16 01:33:35 +0000

    diskinfo: Align and alphabetize options
    
    MFC after:      3 days
    
    (cherry picked from commit afe57c12e97d5c8773d829c2914f35462a7cdd0c)
---
 usr.sbin/diskinfo/diskinfo.8 | 12 ++++++------
 usr.sbin/diskinfo/diskinfo.c | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/usr.sbin/diskinfo/diskinfo.8 b/usr.sbin/diskinfo/diskinfo.8
index 970bafd4f8e5..aea4c123048a 100644
--- a/usr.sbin/diskinfo/diskinfo.8
+++ b/usr.sbin/diskinfo/diskinfo.8
@@ -35,7 +35,7 @@
 .Nd get information about disk device
 .Sh SYNOPSIS
 .Nm
-.Op Fl citSvw
+.Op Fl ciStvw
 .Ar disk ...
 .Nm
 .Op Fl l
@@ -52,9 +52,7 @@ utility prints out information about a disk device,
 and optionally runs a naive performance test on the device.
 .Pp
 The following options are available:
-.Bl -tag -width ".Fl v"
-.It Fl v
-Print fields one per line with a descriptive comment.
+.Bl -tag -width "-c"
 .It Fl c
 Perform a simple measurement of the I/O read command overhead.
 .It Fl i
@@ -70,16 +68,18 @@ character as a separator.
 Return the physical path of the disk.
 This is a string that identifies the physical path to the disk in the
 storage enclosure.
-.It Fl s
-Return the disk ident, usually the serial number.
 .It Fl S
 Perform synchronous random write test (ZFS SLOG test),
 measuring time required to write data blocks of different size and
 flush disk cache.
 Blocks of more then 128KB are written with multiple parallel operations.
+.It Fl s
+Return the disk ident, usually the serial number.
 .It Fl t
 Perform a simple and rather naive benchmark of the disks seek
 and transfer performance.
+.It Fl v
+Print fields one per line with a descriptive comment.
 .It Fl w
 Allow disruptive write tests.
 .El
diff --git a/usr.sbin/diskinfo/diskinfo.c b/usr.sbin/diskinfo/diskinfo.c
index f091d0ccfbea..d8a79d430edb 100644
--- a/usr.sbin/diskinfo/diskinfo.c
+++ b/usr.sbin/diskinfo/diskinfo.c
@@ -58,7 +58,7 @@
 static void
 usage(void)
 {
-	fprintf(stderr, "usage: diskinfo [-ciStvw] disk ...\n"
+	fprintf(stderr, "usage: diskinfo [-citSvw] disk ...\n"
 			"       diskinfo [-l] -p disk ...\n"
 			"       diskinfo [-l] -s disk ...\n"
 				);
@@ -91,7 +91,7 @@ main(int argc, char **argv)
 	u_int	sectorsize, fwsectors, fwheads, zoned = 0, isreg;
 	uint32_t zone_mode;
 
-	while ((ch = getopt(argc, argv, "cilpsStvw")) != -1) {
+	while ((ch = getopt(argc, argv, "cilpSstvw")) != -1) {
 		switch (ch) {
 		case 'c':
 			opt_c = 1;
@@ -107,13 +107,13 @@ main(int argc, char **argv)
 		case 'p':
 			opt_p = 1;
 			break;
-		case 's':
-			opt_s = 1;
-			break;
 		case 'S':
 			opt_S = 1;
 			opt_v = 1;
 			break;
+		case 's':
+			opt_s = 1;
+			break;
 		case 't':
 			opt_t = 1;
 			opt_v = 1;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e03c85.479dc.6b9e02b4>