Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2025 00:51:39 GMT
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: 1ff76f6ddefa - stable/14 - gstat: Sync usage/synopsis + tag SPDX
Message-ID:  <202502270051.51R0pd1D011522@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by ziaee:

URL: https://cgit.FreeBSD.org/src/commit/?id=1ff76f6ddefa66d9b37c6781943db143f0e2d29c

commit 1ff76f6ddefa66d9b37c6781943db143f0e2d29c
Author:     Alexander Ziaee <ziaee@FreeBSD.org>
AuthorDate: 2025-02-03 02:15:26 +0000
Commit:     Alexander Ziaee <ziaee@FreeBSD.org>
CommitDate: 2025-02-27 00:51:00 +0000

    gstat: Sync usage/synopsis + tag SPDX
    
    Sort options using the slightly unusual convention used here as well.
    
    MFC after:              3 days
    Approved by:            carlavilla (mentor), imp (src)
    Differential Revision:  https://reviews.freebsd.org/D48800
    
    (cherry picked from commit 8b35839346d0bd8d4244018489bfdef8fd48de53)
---
 usr.sbin/gstat/gstat.8 | 17 ++++++++++-------
 usr.sbin/gstat/gstat.c |  8 ++++----
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/usr.sbin/gstat/gstat.8 b/usr.sbin/gstat/gstat.8
index d328d26be23c..02dbbbc54a3d 100644
--- a/usr.sbin/gstat/gstat.8
+++ b/usr.sbin/gstat/gstat.8
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
 .\" Copyright (c) 2003 Giorgos Keramidas
 .\" All rights reserved.
 .\"
@@ -22,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 1, 2021
+.Dd February 1, 2025
 .Dt GSTAT 8
 .Os
 .Sh NAME
@@ -30,7 +33,7 @@
 .Nd print statistics about GEOM disks
 .Sh SYNOPSIS
 .Nm
-.Op Fl abBcdops
+.Op Fl abBcCdops
 .Op Fl f Ar filter
 .Op Fl I Ar interval
 .Sh DESCRIPTION
@@ -75,11 +78,6 @@ Only devices with the names matching
 will be displayed.
 The format of the regular expression is described in
 .Xr re_format 7 .
-.It Fl o
-Enable display of statistics for other operations
-.Pq Dv BIO_FLUSH .
-.It Fl s
-Enable blocks' size statistics.
 .It Fl I Ar interval
 Refresh the
 .Nm
@@ -92,8 +90,13 @@ or
 .Cm us
 (the default) indicates that the update interval is specified in
 seconds, milliseconds, or microseconds, respectively.
+.It Fl o
+Enable display of statistics for other operations
+.Pq Dv BIO_FLUSH .
 .It Fl p
 Only display physical providers (those with rank of 1).
+.It Fl s
+Enable blocks' size statistics.
 .El
 .Sh INTERACTIVE COMMANDS
 These commands are currently recognized if
diff --git a/usr.sbin/gstat/gstat.c b/usr.sbin/gstat/gstat.c
index 887ae9dbee16..c650f7120a40 100644
--- a/usr.sbin/gstat/gstat.c
+++ b/usr.sbin/gstat/gstat.c
@@ -141,9 +141,6 @@ main(int argc, char **argv)
 				    "Invalid filter - see re_format(7)");
 			strlcpy(f_s, optarg, sizeof(f_s));
 			break;
-		case 'o':
-			flag_o = 1;
-			break;
 		case 'I':
 			p = NULL;
 			i = strtoul(optarg, &p, 0);
@@ -158,6 +155,9 @@ main(int argc, char **argv)
 				i *= 1;
 			flag_I = i;
 			break;
+		case 'o':
+			flag_o = 1;
+			break;
 		case 'p':
 			flag_p = 1;
 			break;
@@ -615,7 +615,7 @@ out:
 static void
 usage(void)
 {
-	fprintf(stderr, "usage: gstat [-abBcCdps] [-f filter] [-I interval]\n");
+	fprintf(stderr, "usage: gstat [-abBcCdops] [-f filter] [-I interval]\n");
 	exit(EX_USAGE);
         /* NOTREACHED */
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502270051.51R0pd1D011522>