mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-03 01:17:45 +03:00
shared/util: assume ac when /sys/class/power_supply is missing
On s390 (at least) /sys/class/power_supply is not present. We should treat this like if this directory was empty, and not an error.
This commit is contained in:
parent
e93549ef29
commit
6d89003462
@ -5999,7 +5999,7 @@ int on_ac_power(void) {
|
||||
|
||||
d = opendir("/sys/class/power_supply");
|
||||
if (!d)
|
||||
return -errno;
|
||||
return errno == ENOENT ? true : -errno;
|
||||
|
||||
for (;;) {
|
||||
struct dirent *de;
|
||||
|
Loading…
Reference in New Issue
Block a user