From owner-freebsd-arch@FreeBSD.ORG Sun Jul 8 08:05:13 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3162816A41F; Sun, 8 Jul 2007 08:05:13 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id A76FD13C4BF; Sun, 8 Jul 2007 08:05:12 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A563C0.dip.t-dialin.net [84.165.99.192]) by redbull.bpaserver.net (Postfix) with ESMTP id 677782E178; Sun, 8 Jul 2007 09:36:21 +0200 (CEST) Received: from deskjail (deskjail.Leidinger.net [192.168.1.109]) by outgoing.leidinger.net (Postfix) with ESMTP id 46C095B4902; Sun, 8 Jul 2007 09:34:10 +0200 (CEST) Date: Sun, 8 Jul 2007 09:37:34 +0200 From: Alexander Leidinger To: "Constantine A. Murenin" 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> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.13; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=2.7, required 8, BAYES_50 2.50, DKIM_POLICY_SIGNSOME 0.00, J_CHICKENPOX_27 0.60, RDNS_DYNAMIC 0.10, SMILEY -0.50) X-BPAnet-MailScanner-SpamScore: ss X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: Rui Paulo , Andre Oppermann , Reviews , Perforce, "Constantine A. Murenin" , Shteryana Shopova , freebsd-arch@FreeBSD.org Subject: Re: Porting OpenBSD's sysctl hw.sensors framework to FreeBSD (was: Re: PERFORCE change 123040 for review) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 08:05:13 -0000 Quoting "Constantine A. Murenin" (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