blob: 6d3b69cb79d9b43da2c1d2a0b145a9b27abed212 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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;
|