diff options
author | xride <xride@FreeBSD.org> | 2011-09-25 01:35:24 +0800 |
---|---|---|
committer | xride <xride@FreeBSD.org> | 2011-09-25 01:35:24 +0800 |
commit | d4bea9222860a7975abbb451aaa4c74683d2e60e (patch) | |
tree | 5a409bd10bd286f55fe52b2a3329523d98e6dd97 /sysutils/wmbsdbatt/files | |
parent | 22325a846fd83feaa49ec5690c9c0594519a892f (diff) | |
download | freebsd-ports-gnome-d4bea9222860a7975abbb451aaa4c74683d2e60e.tar.gz freebsd-ports-gnome-d4bea9222860a7975abbb451aaa4c74683d2e60e.tar.zst freebsd-ports-gnome-d4bea9222860a7975abbb451aaa4c74683d2e60e.zip |
Added a run time option '-c' to use the temperature of cpu.0 and not acpi.
Diffstat (limited to 'sysutils/wmbsdbatt/files')
-rw-r--r-- | sysutils/wmbsdbatt/files/patch-zz-temperature | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sysutils/wmbsdbatt/files/patch-zz-temperature b/sysutils/wmbsdbatt/files/patch-zz-temperature new file mode 100644 index 000000000000..6d3b69cb79d9 --- /dev/null +++ b/sysutils/wmbsdbatt/files/patch-zz-temperature @@ -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; |