Date: Fri, 7 Jan 2011 08:11:48 -0500 From: John Baldwin <jhb@freebsd.org> To: freebsd-doc@freebsd.org, joris dedieu <joris.dedieu@gmail.com> Subject: Re: docs/153654: [patch] incorrect include in sysctl.9 Message-ID: <201101070811.48852.jhb@freebsd.org> In-Reply-To: <201101071230.p07CU9Dd044913@freefall.freebsd.org> References: <201101071230.p07CU9Dd044913@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, January 07, 2011 7:30:09 am joris dedieu wrote: > The following reply was made to PR docs/153654; it has been noted by GNATS. > > From: joris dedieu <joris.dedieu@gmail.com> > To: John Baldwin <jhb@freebsd.org> > Cc: freebsd-doc@freebsd.org, freebsd-gnats-submit@freebsd.org > Subject: Re: docs/153654: [patch] incorrect include in sysctl.9 > Date: Fri, 7 Jan 2011 12:58:21 +0100 > > 2011/1/3 John Baldwin <jhb@freebsd.org>: > > On Monday, January 03, 2011 12:58:53 pm Joris Dedieu wrote: > >> > >> >Number: =A0 =A0 =A0 =A0 153654 > >> >Category: =A0 =A0 =A0 docs > >> >Synopsis: =A0 =A0 =A0 [patch] incorrect include in sysctl.9 > >> >Confidential: =A0 no > >> >Severity: =A0 =A0 =A0 non-critical > >> >Priority: =A0 =A0 =A0 low > >> >Responsible: =A0 =A0freebsd-doc > >> >State: =A0 =A0 =A0 =A0 =A0open > >> >Quarter: > >> >Keywords: > >> >Date-Required: > >> >Class: =A0 =A0 =A0 =A0 =A0doc-bug > >> >Submitter-Id: =A0 current-users > >> >Arrival-Date: =A0 Mon Jan 03 18:00:24 UTC 2011 > >> >Closed-Date: > >> >Last-Modified: > >> >Originator: =A0 =A0 Joris Dedieu > >> >Release: =A0 =A0 =A0 =A08.1-RELEASE-p2 > >> >Organization: > >> >Environment: > >> FreeBSD ladybug2.rmdir.fr 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Mon = > Dec 27 15:39:23 CET 2010 > > joris@ladybug2.rmdir.fr:/usr/obj/usr/src/sys/GENERIC =A0amd64 > >> > >> >Description: > >> Has DATA_SET is defined in sys/kernel.h most SYSTL_* macros don't work i= > f you don't include it. > >> >How-To-Repeat: > >> > >> >Fix: > >> --- share/man/man9/sysctl.9.orig =A0 =A0 =A0 =A02011-01-03 18:43:53.0000= > 00000 +0100 > >> +++ share/man/man9/sysctl.9 =A0 =A0 2011-01-03 18:44:17.000000000 +0100 > >> @@ -44,7 +44,7 @@ > >> =A0.Nm SYSCTL_QUAD > >> =A0.Nd Static sysctl declaration functions > >> =A0.Sh SYNOPSIS > >> -.In sys/types.h > >> +.In sys/kernel.h > >> =A0.In sys/sysctl.h > >> =A0.Fn SYSCTL_DECL name > >> =A0.Fn SYSCTL_INT parent nbr name access ptr val descr > > > > <sys/kernel.h> does not include <sys/types.h>. =A0Plus, all of <sys/kerne= > l.h> > > is not needed. =A0<sys/linker_set.h> is what defines DATA_SET(). =A0This = > is > > probably the "right" set of includes: > > > > #include <sys/types.h> > > #include <sys/linker_set.h> > > #include <sys/sysctl.h> > > > > OTOH, <sysctl.h> should perhaps have a nested include of <sys/linker_set.= > h> > > in the #ifdef _KERNEL case in which case the manpage would not need chang= > ing. > You are right. My patch is wrong and your solution sounds better. > Should I submit an other pr ? No, the existing PR is fine. I will ask bde@ which solution he prefers and then fix either the manpage or the header. Thanks! -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101070811.48852.jhb>