mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
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
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=282322
2 changed files with 33 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue