From thomas@cuivre.fr.eu.org  Tue Jan 22 14:21:17 2002
Return-Path: <thomas@cuivre.fr.eu.org>
Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6])
	by hub.freebsd.org (Postfix) with ESMTP id 2AD9637B402
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 22 Jan 2002 14:21:12 -0800 (PST)
Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34])
	by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id 4E8EC8214
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 22 Jan 2002 23:21:06 +0100 (CET)
Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000)
	id B525360; Tue, 22 Jan 2002 23:21:05 +0100 (CET)
Message-Id: <20020122222105.B525360@melusine.cuivre.fr.eu.org>
Date: Tue, 22 Jan 2002 23:21:05 +0100 (CET)
From: Thomas Quinot <thomas@cuivre.fr.eu.org>
Reply-To: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Document "sysctl variable=/dev/foo" syntax
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         34184
>Category:       docs
>Synopsis:       Document "sysctl variable=/dev/foo" syntax
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 22 14:30:01 PST 2002
>Closed-Date:    Sun Mar 10 01:54:13 PST 2002
>Last-Modified:  Sun Mar 10 01:54:44 PST 2002
>Originator:     Thomas Quinot
>Release:        FreeBSD 4.5-RC i386
>Organization:
>Environment:
System: FreeBSD melusine.cuivre.fr.eu.org 4.5-RC FreeBSD 4.5-RC #7: Tue Jan 15 22:29:15 CET 2002 thomas@melusine.cuivre.fr.eu.org:/usr/obj/usr/src/sys/MELUSINE i386


	
>Description:
	sysctl.c rev. 1.40 introduced the possibility of changing
	dev_t variables by specifying the name of a special file as
	the value. Since I was the one guilty of implementing that,
	I figured I should punish myself by documenting it.

>How-To-Repeat:
	
>Fix:

Index: sysctl.8
===================================================================
RCS file: /home/ncvs/src/sbin/sysctl/sysctl.8,v
retrieving revision 1.43
diff -u -r1.43 sysctl.8
--- sysctl.8	16 Jan 2002 06:55:29 -0000	1.43
+++ sysctl.8	22 Jan 2002 22:14:20 -0000
@@ -120,7 +120,8 @@
 .Pp
 The information available from
 .Nm
-consists of integers, strings, and opaques.
+consists of integers, strings, devices (dev_t),
+and opaque types.
 .Nm Sysctl
 only knows about a couple of opaque types, and will resort to hexdumps
 for the rest.
@@ -135,7 +136,17 @@
 .Xr sysctl 3 .
 .Pp
 The changeable column indicates whether a process with appropriate
-privilege can change the value.
+privilege can change the value. String, integer, and devices
+values can be set using
+.Xr sysctl 8 .
+For device values,
+.Ar value
+can be specified as a character special file name. Special
+values
+.Ar off
+and
+.Ar none
+denote ``no device''.
 .Bl -column security.bsd.unprivileged_read_msgbuf integerxxx
 .It Sy "Name	Type	Changeable
 .It "kern.ostype	string	no
@@ -164,6 +175,7 @@
 .It "kern.osreldate	string	no
 .It "kern.bootfile	string	yes
 .It "kern.corefile	string	yes
+.It "kern.dumpdev	dev_t	yes
 .It "kern.logsigexit	integer	yes
 .It "security.bsd.suser_enabled	integer	yes
 .It "security.bsd.see_other_uids	integer	yes
@@ -213,6 +225,14 @@
 per uid to 1000, one would use the following request:
 .Pp
 .Dl "sysctl kern.maxprocperuid=1000"
+.Pp
+The device used for crash dumps can be specified using:
+.Pp
+.Dl "sysctl kern.dumpdev=/dev/somedev
+.Pp
+which is strictly equivalent to
+.Pp
+.Dl "dumpon /dev/somedev
 .Pp
 Information about the system clock rate may be obtained with:
 .Pp
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/34184: Document "sysctl variable=/dev/foo" syntax
Date: Wed, 23 Jan 2002 13:34:59 +0200

 On Tue, Jan 22, 2002 at 11:21:05PM +0100, Thomas Quinot wrote:
 > 
 > >Number:         34184
 > >Category:       docs
 > >Synopsis:       Document "sysctl variable=/dev/foo" syntax
 > >Originator:     Thomas Quinot
 > >Release:        FreeBSD 4.5-RC i386
 > >Organization:
 > 	
 > >Description:
 > 	sysctl.c rev. 1.40 introduced the possibility of changing
 > 	dev_t variables by specifying the name of a special file as
 > 	the value. Since I was the one guilty of implementing that,
 > 	I figured I should punish myself by documenting it.
 
 Nice :)  Just a couple of comments..
 
 > >Fix:
 > 
 > @@ -135,7 +136,17 @@
 >  .Xr sysctl 3 .
 >  .Pp
 >  The changeable column indicates whether a process with appropriate
 > -privilege can change the value.
 > +privilege can change the value. String, integer, and devices
 > +values can be set using
 > +.Xr sysctl 8 .
 
 I think new sentences should start on a new line in mdoc manual pages.
 Also, since this *is* the sysctl(8) manual page, it might be better
 to refer to the sysctl command by simply using .Nm here.
 
 > +For device values,
 > +.Ar value
 > +can be specified as a character special file name. Special
 
 New sentence on a new line, as above.
 
 > +values
 > +.Ar off
 > +and
 > +.Ar none
 > +denote ``no device''.
 
 .Dq no device .
 
 Other than that, looks fine to me.
 
 G'luck,
 Peter
 
 -- 
 This sentence contradicts itself - or rather - well, no, actually it doesn't!

From: Thomas Quinot <thomas@cuivre.fr.eu.org>
To: Peter Pentchev <roam@ringlet.net>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/34184: Document "sysctl variable=/dev/foo" syntax
Date: Wed, 23 Jan 2002 16:31:43 +0100

 Peter,
 
 First of all thanks for the feedback on this PR!
 
 Le 2002-01-23, Peter Pentchev crivait :
 
 > I think new sentences should start on a new line in mdoc manual pages.
 
 OK, I was not aware of that rule.
 
 > Also, since this *is* the sysctl(8) manual page, it might be better
 > to refer to the sysctl command by simply using .Nm here.
 
 Absolutely right.
 
 > .Dq no device .
 
 That's nroff wizardry to me ;)
  
 > Other than that, looks fine to me.
 
 OK, here is an updated patch:
 
 Index: sysctl.8
 ===================================================================
 RCS file: /home/ncvs/src/sbin/sysctl/sysctl.8,v
 retrieving revision 1.43
 diff -u -r1.43 sysctl.8
 --- sysctl.8	16 Jan 2002 06:55:29 -0000	1.43
 +++ sysctl.8	23 Jan 2002 15:30:30 -0000
 @@ -120,7 +120,8 @@
  .Pp
  The information available from
  .Nm
 -consists of integers, strings, and opaques.
 +consists of integers, strings, devices (dev_t),
 +and opaque types.
  .Nm Sysctl
  only knows about a couple of opaque types, and will resort to hexdumps
  for the rest.
 @@ -136,6 +137,18 @@
  .Pp
  The changeable column indicates whether a process with appropriate
  privilege can change the value.
 +String, integer, and devices values can be set using
 +.Nm sysctl .
 +.Pp
 +For device values,
 +.Ar value
 +can be specified as a character special file name.
 +Special values
 +.Ar off
 +and
 +.Ar none
 +denote
 +.Dq no device .
  .Bl -column security.bsd.unprivileged_read_msgbuf integerxxx
  .It Sy "Name	Type	Changeable
  .It "kern.ostype	string	no
 @@ -164,6 +177,7 @@
  .It "kern.osreldate	string	no
  .It "kern.bootfile	string	yes
  .It "kern.corefile	string	yes
 +.It "kern.dumpdev	dev_t	yes
  .It "kern.logsigexit	integer	yes
  .It "security.bsd.suser_enabled	integer	yes
  .It "security.bsd.see_other_uids	integer	yes
 @@ -213,6 +227,14 @@
  per uid to 1000, one would use the following request:
  .Pp
  .Dl "sysctl kern.maxprocperuid=1000"
 +.Pp
 +The device used for crash dumps can be specified using:
 +.Pp
 +.Dl "sysctl kern.dumpdev=/dev/somedev
 +.Pp
 +which is strictly equivalent to
 +.Pp
 +.Dl "dumpon /dev/somedev
  .Pp
  Information about the system clock rate may be obtained with:
  .Pp
 
 -- 
     Thomas.Quinot@Cuivre.FR.EU.ORG

From: Peter Pentchev <roam@ringlet.net>
To: Thomas Quinot <thomas@cuivre.fr.eu.org>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: docs/34184: Document "sysctl variable=/dev/foo" syntax
Date: Wed, 23 Jan 2002 17:41:04 +0200

 On Wed, Jan 23, 2002 at 04:31:43PM +0100, Thomas Quinot wrote:
 [snip]
 > > .Dq no device .
 > 
 > That's nroff wizardry to me ;)
 
 Not quite nroff, simply mdoc(7) :)
 
 > > Other than that, looks fine to me.
 > 
 > OK, here is an updated patch:
 
 This one looks fine, at least to me.
 
 G'luck,
 Peter
 
 -- 
 The rest of this sentence is written in Thailand, on
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Sun Mar 10 01:54:13 PST 2002 
State-Changed-Why:  
Some mdoc wizardry fixed, some added, and patch committed.  Thanks for 
taking the time to document this! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34184 
>Unformatted:
