Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 1999 23:15:18 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        chris@calldei.com
Cc:        Bill Fumerola <billf@chc-chimes.com>, peter.jeremy@alcatel.com.au, "Jordan K. Hubbard" <jkh@zippy.cdrom.com>, Dan Moschuk <dan@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/i386/conf files.i386 src/sys/kern kern_fork.c src/sys/libkern arc4random.c src/sys/sys libkern.h 
Message-ID:  <23833.943913718@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 29 Nov 1999 16:09:08 CST." <19991129160908.J2233@holly.calldei.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <19991129160908.J2233@holly.calldei.com>, Chris Costello writes:
>On Mon, Nov 29, 1999, Poul-Henning Kamp wrote:
>> My ideal scenario is that the descriptions end up in their own
>> ELF section which isn't loaded.
>> 
>> sysctl -d could pick them out of `sysctl kern.bootfile` and
>> various scripts could chew them out of the LINT kernel and 
>> spit out mandoc or SGML documentation.
>
>   I don't understand what you mean about "chew them out of the
>LINT kernel".  Are you saying sysctl knobs will be documented
>there?

the sysctl knob will be documented in the source like:

  SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW,
    &domainname, sizeof(domainname), "Name of the current YP/NIS domain");

The string in the last argument gets put in a "non-load" ELF section
in the kernel.

So in the LINT kernel we would supposedly have all the descriptions
in this magic section and pulling them out of there with a tool
would be a swell way to get the sysctl man page written.

It is not particular hard to do this.  You need to figure out some
way to tell GCC to stick this string in the special section,
but otherwise it should be a pretty simple job (do I see any 
hands ?)

The basic objectives are simple really:

priority 1:
	Make it possible to extract the strings for doc (man/sgml)

priority 2:
	Make it possible to extract the strings sysctl -d

Condition:
	The strings cannot be loaded into the running kernel.

--
Poul-Henning Kamp             FreeBSD coreteam member
phk@FreeBSD.ORG               "Real hackers run -current on their laptop."
FreeBSD -- It will take a long time before progress goes too far!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?23833.943913718>