From: jmc Date: Fri, 16 Feb 2018 07:27:07 +0000 (+0000) Subject: simplify synopsis and text; X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b3d2a44107464e86f34d6d361414eb1c5ff85880;p=openbsd simplify synopsis and text; ok millert --- diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 0fc6ca7919e..c74a04d679f 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: sysctl.8,v 1.213 2018/01/12 04:36:44 deraadt Exp $ +.\" $OpenBSD: sysctl.8,v 1.214 2018/02/16 07:27:07 jmc Exp $ .\" $NetBSD: sysctl.8,v 1.4 1995/09/30 07:12:49 thorpej Exp $ .\" .\" Copyright (c) 1993 @@ -30,7 +30,7 @@ .\" .\" @(#)sysctl.8 8.2 (Berkeley) 5/9/95 .\" -.Dd $Mdocdate: January 12 2018 $ +.Dd $Mdocdate: February 16 2018 $ .Dt SYSCTL 8 .Os .Sh NAME @@ -38,13 +38,8 @@ .Nd get or set kernel state .Sh SYNOPSIS .Nm sysctl -.Op Fl Aan -.Nm sysctl -.Op Fl n -.Ar name ... -.Nm sysctl -.Op Fl nq -.Ar name Ns = Ns Ar value ... +.Op Fl Aanq +.Op Ar name Ns Op = Ns Ar value .Sh DESCRIPTION The .Nm @@ -53,7 +48,7 @@ appropriate privilege to set kernel state. The state to be retrieved or set is described using a .Dq Management Information Base .Pq MIB -style name, described as a dotted set of components. +style name, using a dotted set of components. .Pp When retrieving a variable, a subset of the MIB name may be specified to retrieve a list of @@ -62,9 +57,6 @@ For example, to list all the machdep variables: .Pp .Dl $ sysctl machdep .Pp -When setting a variable, -the MIB name should be followed by an equal sign and the new value. -.Pp The options are as follows: .Bl -tag -width xxx .It Fl A @@ -86,11 +78,14 @@ For example, to set the psize shell variable to the pagesize of the hardware: Suppress all output when setting a variable. This option overrides the behaviour of .Fl n . -.It Ar name Ns = Ns Ar value -Attempt to set the specified variable -.Ar name -to +.It Ar name Ns Op = Ns Ar value +Retrieve the specified variable +.Ar name , +or attempt to set it to .Ar value . +Multiple +.Ar name Ns Op = Ns Ar value +arguments may be given. .El .Pp The information available from diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index a0a18b00f51..47f863962df 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.229 2018/02/10 05:53:58 florian Exp $ */ +/* $OpenBSD: sysctl.c,v 1.230 2018/02/16 07:27:07 jmc Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -2723,8 +2723,6 @@ usage(void) { (void)fprintf(stderr, - "usage: sysctl [-Aan]\n" - " sysctl [-n] name ...\n" - " sysctl [-nq] name=value ...\n"); + "usage: sysctl [-Aanq] [name[=value]]\n"); exit(1); }