From nobody Fri Jan 24 15:50:36 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Yfj2N4k89z5lZfk; Fri, 24 Jan 2025 15:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yfj2N39xBz46LV; Fri, 24 Jan 2025 15:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737733836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eLBdtNFMngvnP4JRNUzekVyD/Ryaj+1gI5HHLbJNguQ=; b=YwQdJBZR3o7UvWjcniC5ZTQm8+uc5VtyhLdLnFPZNQQ8ED3wRLjnAut00kShciZMTcR+ys rWKq/SoshDAHGEImrxueH6rL6Fw0Ya34Q4UVnSTiuj0V4Z66fTZpI3+JztI53PXYaNSKQC AZUnFXuNZFvBaC+3E/LTO4b0Hge3U0GcBu47qv14WwGUj3RZYjtn2tVBAqMv4CGp7Gh59g 1kB+Y1dS8lW0jaMySrKuGjtvbCc8nFUfdYQ0VB5Hc+21nkoxuKLveD7HM42gEdnaQh13Nu AJigbEB8plSuuJFFR7BlNoy5vXAVYPxRSjTwk27ILVd461WqmHg/CXq+O9jpWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737733836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eLBdtNFMngvnP4JRNUzekVyD/Ryaj+1gI5HHLbJNguQ=; b=dER5+NNRCFifgDmcC1LiQckeeui4ynf5s2eF+DC3aWyqHZqafRIJuqW9i4XwtRPHgOZC8F o0k9uRS9Sc9sZfc+IPYomObvA8c3ZNxWZtc/m5vmMfZX+drI5g8RGxPDz0OcXfwUNZN+B+ ORT/04TqpzfUiC2sKCwQnpAfrQVifC5odyzd5PJnm2lOyB5Je7bA0cnxn99GRz9tp8LZhW P98MoyR0sIr8Ol/uF/nxuimN65McXBVlNobMpW8WD4q86ssQHW2RuQwUgstJkSAEvd11x0 vlXnhgIoYYm2wjN3YcxQxDCSXyKWw2OfvFuhIn3B/u2pUvh/+U1xIj6JaV+dSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737733836; a=rsa-sha256; cv=none; b=iqjRPaxD+TEKUAmKsS5jc3k8KNMw2q6f2xoaYCQ5vdvcf0/71UDvtsljrmmMB9IbHhVRE4 y6ke48EATpK8LAJ+PGoGjYy3Jkmibyjy4Tor0PtSKRzsBfiEdr+1KrfTL76ll8trRU3ER9 O0dmmbfNon0sTTV+StCThUHAop9kw4KAjK91+UOYG+JIZ9I4JJOzsfxcmPjBD5+IZU9VBr u7qO0/8RzqosiyYO1JRVAtkSTiZ+YqdXWQKBPdfSqTSnsvCvHhnJW3yN+0MIl60CXrSFuS lm3gl7u9klk39vusm9PwbJ8RJ2HZv5JfVw1S7OQP6B6nqaGRAVqgXo9StooA3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Yfj2N2l1qzXmd; Fri, 24 Jan 2025 15:50:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50OFoap2048376; Fri, 24 Jan 2025 15:50:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50OFoaaE048373; Fri, 24 Jan 2025 15:50:36 GMT (envelope-from git) Date: Fri, 24 Jan 2025 15:50:36 GMT Message-Id: <202501241550.50OFoaaE048373@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0e4f9db00dc3 - stable/14 - sysctl: Sort options List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0e4f9db00dc3907f90152afdeee7965555563927 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0e4f9db00dc3907f90152afdeee7965555563927 commit 0e4f9db00dc3907f90152afdeee7965555563927 Author: Zhenlei Huang AuthorDate: 2025-01-23 08:01:04 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-24 15:49:49 +0000 sysctl: Sort options No functional change intended. MFC after: 1 day (cherry picked from commit c294ecb25b5f3553b5c84b630869bb05724c9629) --- 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 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;