mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-06 13:41:31 +00: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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user