From owner-freebsd-current Thu Jun 3 22:48: 8 1999 Delivered-To: freebsd-current@freebsd.org Received: from ewok.creative.net.au (ewok.creative.net.au [203.30.44.41]) by hub.freebsd.org (Postfix) with SMTP id 11EFD151E8 for ; Thu, 3 Jun 1999 22:47:58 -0700 (PDT) (envelope-from adrian@freebsd.org) Received: (qmail 21250 invoked by uid 1008); 4 Jun 1999 05:47:54 -0000 Message-ID: <19990604054754.21248.qmail@ewok.creative.net.au> From: adrian@freebsd.org To: Peter Jeremy Cc: freebsd-current@freebsd.org Subject: Re: sysctl In-reply-to: Your message of "Fri, 04 Jun 1999 14:52:18 +1000." <99Jun4.143622est.40321@border.alcanet.com.au> Date: Fri, 04 Jun 1999 13:47:53 +0800 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter Jeremy writes: >I notice that sysctl -d doesn't work, and I suspect it never did. > >Looking at the code, sbin/sysctl/sysctl.c uses MIB {0,5} to request >the description of a variable, but the code in sys/kern/kern_sysctl.c >only supports {0,0} through {0,4}. Additionally, the macro SYSCTL_OID >doesn't reference the description string. > >I recall some months ago, there was a discussion about the description >strings, but I don't think it went anywhere. > >My feeling is that the description strings should be put into an ELF >segment which isn't loaded - sysctl(3) would return an offset into >that segment and it would be up to the caller to extract the string >from the relevent section of kern.bootfile. I know this is all >relatively easy, but my system seems to be missing elf(5) :-), so I'm >not sure of the details. > >kern_sysctl.c also states: > * This interface is under work and consideration, and should probably > * be killed with a big axe by the first person who can find the time. > >Is anyone actually working on this? No, not on the interface - I'm working on finishing up the descriptions of a whole heap of sysctl variables. A rather large patch was apparently commited a month or two ago with the beginnings of documenting sysctl variables, but I currently have a lack of time to finish this and consider perhaps attacking the sysctl interface (and a few things I want to fix beforehand..) There was talk of a script being written to walk the /usr/src/sys tree and generate a sysctl descriptions file. Is someone going to be nice enough to do this? :-) Adrian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message