From redpixel@lockdown.spectrum.fearmuffs.net  Fri Jun 14 05:17:22 2002
Return-Path: <redpixel@lockdown.spectrum.fearmuffs.net>
Received: from lockdown.spectrum.fearmuffs.net (c164-147.pro.thalamus.se [212.31.164.147])
	by hub.freebsd.org (Postfix) with ESMTP id 7F5D537B411
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jun 2002 05:17:10 -0700 (PDT)
Received: from lockdown.spectrum.fearmuffs.net (localhost.spectrum.fearmuffs.net [127.0.0.1])
	by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3) with ESMTP id g5ECGWdu000402
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jun 2002 14:16:32 +0200 (CEST)
	(envelope-from redpixel@lockdown.spectrum.fearmuffs.net)
Received: (from redpixel@localhost)
	by lockdown.spectrum.fearmuffs.net (8.12.3/8.12.3/Submit) id g5ECGVlU000401;
	Fri, 14 Jun 2002 14:16:31 +0200 (CEST)
	(envelope-from redpixel)
Message-Id: <200206141216.g5ECGVlU000401@lockdown.spectrum.fearmuffs.net>
Date: Fri, 14 Jun 2002 14:16:31 +0200 (CEST)
From: Martin Faxer <gmh003532@brfmasthugget.se>
Reply-To: Martin Faxer <gmh003532@brfmasthugget.se>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: the dumpon man page incorrectly states that sysctl(3) is used 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39293
>Category:       docs
>Synopsis:       the dumpon man page incorrectly states that sysctl(3) is used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hmp
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 14 05:20:01 PDT 2002
>Closed-Date:    Wed May 07 12:44:22 PDT 2003
>Last-Modified:  Wed May 07 12:44:22 PDT 2003
>Originator:     Martin Faxer
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
none 
>Environment:
System: FreeBSD lockdown.spectrum.fearmuffs.net 5.0-CURRENT FreeBSD 5.0-CURRENT #11: Fri Jun 14 14:02:42 CEST 2002 redpixel@lockdown.spectrum.fearmuffs.net:/usr/obj/usr/src/sys/LOCKDOWN i386


	
>Description:
the dumpon(8) man page states that dumpon uses sysctl(3) to set the
dump device.  this is however incorrect, as can be proved by reading
the code.  the reality is that ioctl() is used on the opened special
device.
	
>How-To-Repeat:
read the dumpon(8) man page
	
>Fix:
apply the following patch:
	

--- dumpon.diff begins here ---
Index: dumpon.8
===================================================================
RCS file: /home/ncvs/src/sbin/dumpon/dumpon.8,v
retrieving revision 1.23
diff -u -r1.23 dumpon.8
--- dumpon.8	9 Apr 2002 19:51:50 -0000	1.23
+++ dumpon.8	14 Jun 2002 12:03:58 -0000
@@ -81,18 +81,20 @@
 .Pp
 The
 .Nm
-program operates by setting the
-.Xr sysctl 3
-MIB variable
-.Dq kern.dumpdev
-to the device number of the designated
+program operates by opening the designated
 .Ar special_file
-or to
-.Dv NODEV
-(meaning that no dumps are to be taken) if
+and doing an
+.Xr ioctl 2
+request,
+.Dv DIOCSKERNELDUMP ,
+telling the kernel to use that device for saving dumps.
+If
 .Ar special_file
 is the text string:
-.Dq Li off .
+.Dq Li off ,
+dumpon opens
+.Pa /dev/null ,
+telling the kernel not to save crash dumps.
 .Pp
 Since
 .Nm
--- dumpon.diff ends here ---


>Release-Note:
>Audit-Trail:

From: Hiten Pandya <hiten@uk.FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc: Martin =?iso-8859-1?Q?Fax=E9r?= <gmh003532@brfmasthugget.se>
Subject: docs/39293: the dumpon man page incorrectly states that sysctl(3) is used
Date: Sat, 15 Jun 2002 10:50:08 +0100

 Hi.
 
 As far as I know, and my research goes, this change should only be 
 applied to CURRENT, but NOT to be MFC'ed.  This is because, if you:
 
   o look into the dumpon source code, you will see that this
     change, coined as "New dumping infrastructure" was implemented
     in revision 1.14, BRANCH: MAIN by the great phk.
 
   o The RELENG_4, and RELENG_4_5, AND RELENG_4_6 are still using
     the sysctl(3) infrastructure; because as far as my knowledge
     goes, the new DUMPING ioctl's are only available in -current
     thus made use by -current only.
 
 I hope this helps to clear my point.
 Thanks.
 
 -- 
 Hiten Pandya
 http://storm.uk.FreeBSD.org/~hiten
 Finger hiten@storm.uk.FreeBSD.org for PGP public key
 -- 4FB9 C4A9 4925 CF97 9BF3  ADDA 861D 5DBD E4E3 03C3 
Responsible-Changed-From-To: freebsd-doc->hmp 
Responsible-Changed-By: hmp 
Responsible-Changed-When: Wed May 7 09:11:30 PDT 2003 
Responsible-Changed-Why:  
You are right, the dumpon(8) manual page is 
not documenting the new behaviour.  I will 
take care of this.  For the record, this PR is 
regarding rev 1.14 of sbin/dumpon/dumpon.c 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39293 
State-Changed-From-To: open->closed 
State-Changed-By: hmp 
State-Changed-When: Wed May 7 12:42:02 PDT 2003 
State-Changed-Why:  
I have commited a slighly different fix derived from 
the patch available in this PR.  Thanks Martin! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39293 
>Unformatted:
