From owner-p4-projects@FreeBSD.ORG Sat Jul 28 01:03:59 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D90E316A469; Sat, 28 Jul 2007 01:03:58 +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 9730516A417 for ; Sat, 28 Jul 2007 01:03:58 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 83C0013C428 for ; Sat, 28 Jul 2007 01:03:58 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6S13woJ003209 for ; Sat, 28 Jul 2007 01:03:58 GMT (envelope-from cnst@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6S13wuX003206 for perforce@freebsd.org; Sat, 28 Jul 2007 01:03:58 GMT (envelope-from cnst@FreeBSD.org) Date: Sat, 28 Jul 2007 01:03:58 GMT Message-Id: <200707280103.l6S13wuX003206@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cnst@FreeBSD.org using -f From: "Constantine A. Murenin" To: Perforce Change Reviews Cc: Subject: PERFORCE change 124235 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: Sat, 28 Jul 2007 01:03:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=124235 Change 124235 by cnst@dale on 2007/07/28 01:03:07 add hw.sensors tree handler: system still compiles and boots. :) Only hw.sensors node itself is available from sysctl(8) as of now, no leaves are visible yet. Affected files ... .. //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sensors.c#5 edit Differences ... ==== //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sensors.c#5 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $P4: //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sensors.c#4 $ */ +/* $P4: //depot/projects/soc2007/cnst-sensors/sys.kern/kern_sensors.c#5 $ */ /* $FreeBSD$ */ /* $OpenBSD: kern_sensors.c,v 1.19 2007/06/04 18:42:05 deraadt Exp $ */ @@ -271,8 +271,10 @@ */ int sysctl_rdstruct(void *, size_t *, void *, const void *, int); int sysctl_sensors(int *, u_int, void *, size_t *, void *, size_t); +int sysctl_sensors_handler(SYSCTL_HANDLER_ARGS); -SYSCTL_NODE(_hw, HW_SENSORS, sensors, CTLFLAG_RD, 0, "Hardware Sensors"); +SYSCTL_NODE(_hw, HW_SENSORS, sensors, CTLFLAG_RD, sysctl_sensors_handler, + "Hardware Sensors"); /* * Validate parameters and get old parameters @@ -353,3 +355,12 @@ return (ret); } +int +sysctl_sensors_handler(SYSCTL_HANDLER_ARGS) +{ + int rv; + + rv = sysctl_sensors(arg1, arg2, req->oldptr, &req->oldlen, + req->newptr, req->newlen); + return (rv); +}