aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2025-01-23 08:01:04 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2025-01-24 15:49:49 +0000
commit0e4f9db00dc3907f90152afdeee7965555563927 (patch)
treeef63865a7ef05ab99077865e9b3d221f6f332dba
parent1d890d546b064f2c7753b949f5dbf00d79cde292 (diff)
sysctl: Sort options
No functional change intended. MFC after: 1 day (cherry picked from commit c294ecb25b5f3553b5c84b630869bb05724c9629)
-rw-r--r--sbin/sysctl/sysctl.816
-rw-r--r--sbin/sysctl/sysctl.c26
2 files changed, 21 insertions, 21 deletions
diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8
index da4dec6be005..aee66173fdea 100644
--- a/sbin/sysctl/sysctl.8
+++ b/sbin/sysctl/sysctl.8
@@ -70,10 +70,6 @@ opaque or excluded from listing via the
flag.
This option is ignored if one or more variable names are specified on
the command line.
-.It Fl b
-Force the value of the variable(s) to be output in raw, binary format.
-No names are printed and no terminating newlines are output.
-This is mostly useful with a single variable.
.It Fl B Ar bufsize
Set the buffer size to read from the
.Nm
@@ -83,6 +79,10 @@ This is necessary for a
.Nm
that has variable length, and the probe value of 0 is a valid length, such as
.Va kern.arandom .
+.It Fl b
+Force the value of the variable(s) to be output in raw, binary format.
+No names are printed and no terminating newlines are output.
+This is mostly useful with a single variable.
.It Fl d
Print the description of the variable instead of its value.
.It Fl e
@@ -96,15 +96,15 @@ This option is ignored if either
or
.Fl n
is specified, or a variable is being set.
+.It Fl F
+Print the format of the variable.
+This is additional information to describe the type of the variable and
+most useful with struct types such as clockinfo, timeval, and loadavg.
.It Fl f Ar filename
Specify a file which contains a pair of name and value in each line.
.Nm
reads and processes the specified file first and then processes the name
and value pairs in the command line argument.
-.It Fl F
-Print the format of the variable.
-This is additional information to describe the type of the variable and
-most useful with struct types such as clockinfo, timeval, and loadavg.
.It Fl h
Format output for human, rather than machine, readability.
.It Fl i
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index df9b453d52a0..13161e9a3be4 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -137,7 +137,7 @@ main(int argc, char **argv)
setbuf(stdout,0);
setbuf(stderr,0);
- while ((ch = getopt(argc, argv, "AabB:def:FhiJlNnoqtTVwWxX")) != -1) {
+ while ((ch = getopt(argc, argv, "AaB:bdeFf:hiJlNnoqTtVWwXx")) != -1) {
switch (ch) {
case 'A':
/* compatibility */
@@ -146,24 +146,24 @@ main(int argc, char **argv)
case 'a':
aflag = 1;
break;
- case 'b':
- bflag = 1;
- break;
case 'B':
Bflag = strtol(optarg, NULL, 0);
break;
+ case 'b':
+ bflag = 1;
+ break;
case 'd':
dflag = 1;
break;
case 'e':
eflag = 1;
break;
- case 'f':
- conffile = optarg;
- break;
case 'F':
Fflag = true;
break;
+ case 'f':
+ conffile = optarg;
+ break;
case 'h':
hflag = 1;
break;
@@ -188,22 +188,22 @@ main(int argc, char **argv)
case 'q':
qflag = 1;
break;
- case 't':
- tflag = 1;
- break;
case 'T':
Tflag = 1;
break;
+ case 't':
+ tflag = 1;
+ break;
case 'V':
Vflag = true;
break;
+ case 'W':
+ Wflag = 1;
+ break;
case 'w':
/* compatibility */
/* ignored */
break;
- case 'W':
- Wflag = 1;
- break;
case 'X':
/* compatibility */
aflag = xflag = 1;