diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-02-20 20:12:19 +0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-02-21 20:48:33 +0100 |
commit | e0b3a70fabb871bf55678e9e177445b1df2aee88 (patch) | |
tree | ae28c74109133b4db42cd1ab6c17f498280c1e41 /src/login | |
parent | f8979e869812988835f6951fb73a68e30a4c608c (diff) | |
download | systemd-e0b3a70fabb871bf55678e9e177445b1df2aee88.tar.gz |
sleep: check if we're on AC power before checking battery capacity
Before this commit, battery_is_low() returns
true if there's no battery on the system.
It's now modified to check if the system is
on AC power first, and returns false early
if that's the case.
Fixes #26492
Diffstat (limited to 'src/login')
0 files changed, 0 insertions, 0 deletions