From owner-cvs-all Mon Nov 29 14:17:18 1999 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 8E8FF1546E; Mon, 29 Nov 1999 14:17:10 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id XAA23835; Mon, 29 Nov 1999 23:15:18 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: chris@calldei.com Cc: Bill Fumerola , peter.jeremy@alcatel.com.au, "Jordan K. Hubbard" , Dan Moschuk , 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 In-reply-to: Your message of "Mon, 29 Nov 1999 16:09:08 CST." <19991129160908.J2233@holly.calldei.com> Date: Mon, 29 Nov 1999 23:15:18 +0100 Message-ID: <23833.943913718@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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