Date: Sun, 8 Jul 2007 09:37:34 +0200 From: Alexander Leidinger <Alexander@Leidinger.net> To: "Constantine A. Murenin" <cnst@FreeBSD.org> Cc: Rui Paulo <rpaulo@fnop.net>, Andre Oppermann <andre@FreeBSD.org>, Reviews <perforce@FreeBSD.org>, Perforce, "Constantine A. Murenin" <cnst@FreeBSD.org>, Shteryana Shopova <syrinx@FreeBSD.org>, freebsd-arch@FreeBSD.org Subject: Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD (was: Re: PERFORCE change 123040 for review) Message-ID: <20070708093734.31df53b3@deskjail> In-Reply-To: <46904153.7040909@FreeBSD.org> References: <200707062345.l66Njpx3091970@repoman.freebsd.org> <468ED66E.5080400@fnop.net> <468F517D.3010709@freebsd.org> <46904153.7040909@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Quoting "Constantine A. Murenin" <cnst@FreeBSD.org> (Sat, 07 Jul 2007 21:43:47 -0400): > On 07/07/2007 04:40, Andre Oppermann wrote: > > > Rui Paulo wrote: > > > >> Constantine A. Murenin wrote: > >> > >>> http://perforce.freebsd.org/chv.cgi?CH=123040 > >>> > >>> Change 123040 by cnst@dale on 2007/07/06 23:45:36 > >>> > >>> add new node to sysctl.h: HW_SENSORS / "hw.sensors" > >> > >> > >> Hmm. I thought new sysctl nodes or leafs were dynamic and you needn't to > >> add any entry to sysctl.h. > > > > > > Yes, all new sysctl nodes and leaves should be entirely dynamic. > > The (old) static ones should go away with 8.0 or so. IIRC there > > hasn't been any new static sysctl node since a loooong time. > > I don't exactly consider April 2007 being a loooong time ago. ;) > > So even first- and second-level nodes must be generated dynamically by 8.0? > > Hardware sensors tree is going to be pretty deep down. Under sysctl(8) > the variable names will look like this: > > hw.sensors.lm0.temp0 > > whereas in reality, the tree has five levels: > > hw.sensors.lm0.temp.0 > > but as an exception to sysctl rule -- specifically for hw.sensors -- in > OpenBSD the last dot is ommitted from sysctl(8) presentation to the > user, to improve readability and preserve some sanity. :) I want to keep Have a look at the dev tree, we don't have this rule in FreeBSD: ---snip--- dev.xl.0.%desc: 3Com 3c905C-TX Fast Etherlink XL dev.xl.0.%driver: xl dev.xl.0.%location: slot=11 function=0 dev.xl.0.%pnpinfo: vendor=0x10b7 device=0x9200 subvendor=0x10b7 subdevice=0x1000 class=0x020000 dev.xl.0.%parent: pci0 dev.xl.1.%desc: 3Com 3c905C-TX Fast Etherlink XL dev.xl.1.%driver: xl dev.xl.1.%location: slot=12 function=0 dev.xl.1.%pnpinfo: vendor=0x10b7 device=0x9200 subvendor=0x10b7 subdevice=0x1000 class=0x020000 dev.xl.1.%parent: pci0 ---snip--- > FreeBSD's sysctl hw.sensors tree compatible with the one in OpenBSD, so > that both sysctl(8) shell scripts and sysctl(3) C utilities will be > portable between the systems. I let other people comment if the hw.sensors tree should be consistent with the rest of the sysctl tree (personally I lean towards this, but I'm not interested in a bikeshed discussion, I just want to point out the current facts in FreeBSD) or compatible with OpenBSD (I don't moan if this is the final result). Bye, Alexander. -- Want to see how much virtual memory you're using? Just type "swapinfo" to be shown information about the usage of your swap partitions. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070708093734.31df53b3>
