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 | |
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.
-rw-r--r-- | sysutils/wmbsdbatt/Makefile | 2 | ||||
-rw-r--r-- | sysutils/wmbsdbatt/files/patch-zz-temperature | 32 |
2 files changed, 33 insertions, 1 deletions
diff --git a/sysutils/wmbsdbatt/Makefile b/sysutils/wmbsdbatt/Makefile index 2649c9cb8a19..74ffcea88b08 100644 --- a/sysutils/wmbsdbatt/Makefile +++ b/sysutils/wmbsdbatt/Makefile @@ -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/ 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; |