summaryrefslogtreecommitdiffstats
path: root/src/shared/battery-util.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* battery-util: raise log level for battery_is_discharging_and_lowMike Yuan2024-01-141-2/+2
|
* battery-util: log_notice when unsure about battery stateMike Yuan2023-08-131-1/+1
| | | | | | | | Follow-up for 02f7f8aa4f1d0b7a24ee3cd5685a791771d9ded5 This deserves some highlight. Addresses https://github.com/systemd/systemd/pull/28597#discussion_r1288592726
* battery-util: don't log duplicate messageMike Yuan2023-08-131-2/+1
| | | | | | | | | Follow-up for 02f7f8aa4f1d0b7a24ee3cd5685a791771d9ded5 Addresses https://github.com/systemd/systemd/pull/28597#discussion_r1288591215 > this is pretty unnecessary, battery_read_capacity_percentage() debug logs on its own about this already, in more detailed way?
* systemd-battery-check: provide more debug logsZbigniew Jędrzejewski-Szmek2023-07-311-2/+11
| | | | | | The logs would give no hint about the answer to most interesting question: why we decided to return true or false from the program. If we find batteries that are low or uncertain, log at info level.
* device-util: Declare iterator variables inlineDaan De Meyer2023-07-121-3/+1
|
* battery-util: debug log when we're unsure about the battery levelMike Yuan2023-06-091-7/+5
|
* battery-util: be more careful when determining whether we are in a low ↵Lennart Poettering2023-06-051-3/+24
| | | | | | | battery state Let's avoid assuming a low battery battery state if in doubt. That means, handle errors reading battery state gracefully.
* battery-util: move battery_is_discharging_and_low() to battery-util.[ch]Lennart Poettering2023-06-051-0/+80
| | | | | | | | | | This moves a first batch of functions from sleep-config.[ch] over to battery-util.[ch]. In the long run we should probably move even more stuff over, i.e. anything that deals with the battery sysfs driver interface. No code change.
* battery-util: split out code that checks AC power state into its own .c/.h pairLennart Poettering2023-06-051-0/+178
No code change, just some splitting out of the relevant code from udev-util.[ch]. This makes sense on its own, but is also prepartion to move the code that checks for low battery state into battery-util.[ch], too.