Age | Commit message (Collapse) | Author |
|
checking, and fix up format checking complaints.
Added out(type, value) function to stat to avoid a zillion printf typecasts.
|
|
|
|
|
|
|
|
* acpi_callback had blindly assumed that a path of 26 chars or more was
the right depth; rely on depth from dirtree root
* acpi -c shows cooling device state
some backlights are set up so that they will report dimmer as higher,
but that's a hardware issue that can't be sanely worked around.
* acpi -t shows temperatures
this implementation will pick up fan, battery temperatures, etc.
(but currently not hwmon-type temperatures, or hdd temps;
acpi 1.7 does not measure these either)
we handle milli-C (typical) and deci-C (I've seen this on Qualcomm
batteries, and not yet anywhere else)
we do *not* handle deci-K yet
* acpi -V shows all sensors
* without saving the result of dirtree_path() to free later, we had
a slow leak.
all callbacks call this once, so save it in GLOBALS()
acpi -t happens to need this anyhow, though using openat()/readall()
instead of readfile() would work.
|
|
|
|
|
|
phone, so here's a basic acpi.
I could probably add -c fairly easily (print type, cur_state, and max_state)
-t is more difficult, since temperatures are reported in at least
1000 * degrees F and 10 * degrees C.
|