chiark / gitweb /
shared/machine-pool: remove unnecessary check
[elogind.git] / src / shared / util.c
index 241e7520b9d35fd4d763868aa5557baa2eacc370..74f29949c97619ce429b49e5b6f8d49f43fb297a 100644 (file)
@@ -1689,6 +1689,7 @@ bool chars_intersect(const char *a, const char *b) {
 
 bool fstype_is_network(const char *fstype) {
         static const char table[] =
+                "afs\0"
                 "cifs\0"
                 "smbfs\0"
                 "sshfs\0"
@@ -5998,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;