Added a run time option '-c' to use the temperature of cpu.0 and not acpi.
This commit is contained in:
parent
a056a73ffc
commit
f255bb2a8c
@ -6,7 +6,7 @@
|
||||
|
||||
PORTNAME= wmbsdbatt
|
||||
PORTVERSION= 0.1
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= sysutils windowmaker
|
||||
MASTER_SITES= http://homepage.univie.ac.at/l.ertl/wmbsdbatt/files/
|
||||
|
||||
|
||||
32
sysutils/wmbsdbatt/files/patch-zz-temperature
Normal file
32
sysutils/wmbsdbatt/files/patch-zz-temperature
Normal file
@ -0,0 +1,32 @@
|
||||
--- wmbsdbatt.c.orig 2011-09-24 19:20:00.000000000 +0200
|
||||
+++ wmbsdbatt.c 2011-09-24 19:20:23.000000000 +0200
|
||||
@@ -79,7 +79,9 @@
|
||||
static char *sysctl_battery_state = "hw.acpi.battery.state";
|
||||
static char *sysctl_battery_life = "hw.acpi.battery.life";
|
||||
static char *sysctl_battery_time = "hw.acpi.battery.time";
|
||||
-static char *sysctl_temperature = "hw.acpi.thermal.tz0.temperature";
|
||||
+static char *sysctl_temperature;
|
||||
+static char *sysctl_temperature_acpi = "hw.acpi.thermal.tz0.temperature";
|
||||
+static char *sysctl_temperature_cpu0 = "dev.cpu.0.temperature";
|
||||
static char *sysctl_acline = "hw.acpi.acline";
|
||||
static char *sysctl_frequency = "dev.cpu.0.freq";
|
||||
|
||||
@@ -148,11 +150,17 @@
|
||||
|
||||
sa.sa_handler = SIG_IGN;
|
||||
sa.sa_flags = SA_NOCLDWAIT;
|
||||
- while ((ch = getopt(argc, argv, "bh")) != -1) {
|
||||
+
|
||||
+ sysctl_temperature = sysctl_temperature_acpi;
|
||||
+
|
||||
+ while ((ch = getopt(argc, argv, "bch")) != -1) {
|
||||
switch (ch) {
|
||||
case 'b':
|
||||
backlight = LIGHTON;
|
||||
break;
|
||||
+ case 'c':
|
||||
+ sysctl_temperature = sysctl_temperature_cpu0;
|
||||
+ break;
|
||||
case 'h':
|
||||
usage();
|
||||
break;
|
||||
Loading…
x
Reference in New Issue
Block a user