Date: Thu, 23 Jan 2025 08:01:53 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c294ecb25b5f - main - sysctl: Sort options Message-ID: <202501230801.50N81reA067094@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c294ecb25b5f3553b5c84b630869bb05724c9629 commit c294ecb25b5f3553b5c84b630869bb05724c9629 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2025-01-23 08:01:04 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2025-01-23 08:01:04 +0000 sysctl: Sort options No functional change intended. MFC after: 1 day --- sbin/sysctl/sysctl.8 | 16 ++++++++-------- sbin/sysctl/sysctl.c | 26 +++++++++++++------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 8cffb180ca67..b6a06e2c3bab 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -68,10 +68,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 @@ -81,6 +77,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 @@ -94,15 +94,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 ef5d0508e5c3..d3a3c64057d3 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -136,7 +136,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 */ @@ -145,24 +145,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; @@ -187,22 +187,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501230801.50N81reA067094>