Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2007 01:03:58 GMT
From:      "Constantine A. Murenin" <cnst@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124235 for review
Message-ID:  <200707280103.l6S13wuX003206@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707280103.l6S13wuX003206>