From 3db1540066e3fcbfe3735b902131b5c5eb073de0 Mon Sep 17 00:00:00 2001 From: octo Date: Tue, 11 Apr 2006 19:26:22 +0000 Subject: [PATCH] Removed the voltage readings from the `apple_sensors' plugin. They should be read in the `battery' plugin. Look for IOBatteryInfo --- src/apple_sensors.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/apple_sensors.c b/src/apple_sensors.c index 04a97cc0..a8f92a54 100644 --- a/src/apple_sensors.c +++ b/src/apple_sensors.c @@ -61,7 +61,6 @@ static mach_port_t io_master_port; static char *temperature_file = "apple_sensors/temperature-%s.rrd"; static char *fanspeed_file = "apple_sensors/fanspeed-%s.rrd"; -static char *voltage_file = "apple_sensors/temperature-%s.rrd"; static char *ds_def[] = { @@ -112,11 +111,6 @@ static void fanspeed_write (char *host, char *inst, char *val) as_write (host, inst, val, fanspeed_file); } -static void voltage_write (char *host, char *inst, char *val) -{ - as_write (host, inst, val, voltage_file); -} - #if IOKIT_HAVE_READ static void as_submit (char *type, char *inst, double value) { @@ -233,8 +227,8 @@ static void as_read (void) } else if (strcmp (type, "voltage") == 0) { - value_double = ((double) value_int) / 65536.0; - strncpy (type, "apple_voltage", 128); + /* Leave this to the battery plugin. */ + continue; } else { @@ -260,7 +254,6 @@ void module_register (void) plugin_register (MODULE_NAME, as_init, as_read, NULL); plugin_register ("apple_temperature", NULL, NULL, temperature_write); plugin_register ("apple_fanspeed", NULL, NULL, fanspeed_write); - plugin_register ("apple_voltage", NULL, NULL, voltage_write); } #undef MODULE_NAME -- 2.11.0