aboutsummaryrefslogtreecommitdiff
path: root/toys/other/acpi.c
AgeCommit message (Collapse)Author
2017-01-28Add missing `static`s and remove an unused function.Elliott Hughes
2017-01-28Whitespace.Rob Landley
2016-01-05Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable formatRob Landley
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts.
2015-08-02Mark command-local functions static.Rob Landley
2014-11-22As long as Android's going to require fortify, fixup the warnings it generates.Rob Landley
2014-11-22Whitespace/code style.Rob Landley
2014-10-10acpi: implement -ctV, fix recursion, plug a small leakIsaac Dunham
* 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.
2014-02-16Various cleanups found by Tom Sparrow's static analysis.Rob Landley
2013-09-09Cleanup on acpi, switch to default y.Rob Landley
2013-09-09I got tired of trying to guess how much terminal time I could get in on my ↵Isaac Dunham
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.