From owner-p4-projects@FreeBSD.ORG Mon Aug 27 15:18:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B33D516A46B; Mon, 27 Aug 2007 15:18:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DFEB16A417; Mon, 27 Aug 2007 15:18:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 51D7613C45A; Mon, 27 Aug 2007 15:18:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 436EA1A4D93; Mon, 27 Aug 2007 07:56:19 -0700 (PDT) From: John Baldwin To: "Constantine A. Murenin" Date: Mon, 27 Aug 2007 10:47:16 -0400 User-Agent: KMail/1.9.7 References: <200708070030.l770UZ4f074257@repoman.freebsd.org> In-Reply-To: <200708070030.l770UZ4f074257@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708271047.16689.jhb@freebsd.org> Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124787 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2007 15:18:43 -0000 On Monday 06 August 2007 08:30:35 pm Constantine A. Murenin wrote: > http://perforce.freebsd.org/chv.cgi?CH=124787 > > Change 124787 by cnst@dale on 2007/08/07 00:30:22 > > sensordev_get(9)/sensor_find(9) are only used for sysctl(3) glue code, > and on FreeBSD it is all located in kern_sensors.c, so no need to put > prototypes in . Have you thought about using the dynamic sysctl tree stuff in FreeBSD instead of having hw.sensors proc handler that walks the sensor tree? You could just give each sensor its own sysctl_ctx and tree. You can then use standard sysctl routines for handling individual sensor nodes, (or still use custom ones with SYSCTL_ADD_PROC) etc. OpenBSD doesn't support adding sysctls at runtime, so they had to use a complex hw.sensors routine, but you can take advantage of the dynamic sysctl tree in FreeBSD to reduce complexity. -- John Baldwin