chiark / gitweb /
logind: don't print error if devices vanish during ACL-init
authorDavid Herrmann <dh.herrmann@gmail.com>
Wed, 2 Apr 2014 14:20:13 +0000 (16:20 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 2 Apr 2014 14:25:40 +0000 (16:25 +0200)
If a device is unplugged while we initialize it, we will get ENOENT for
ACL-init (and related stuff). We currently print errors then, which is
misleading. Print a debug-message early and continue.

src/login/logind-acl.c

index dc86f0f1a2c3557394e6f2577ef40857975bf882..4bbeb64e8b86276fcf7e1632c389aa28ef975f7e 100644 (file)
@@ -279,7 +279,9 @@ int devnode_acl_all(struct udev *udev,
 
                 log_debug("Fixing up ACLs at %s for seat %s", n, seat);
                 k = devnode_acl(n, flush, del, old_uid, add, new_uid);
-                if (k < 0)
+                if (k == -ENOENT)
+                        log_debug("Device %s disappeared while setting ACLs", n);
+                else if (k < 0)
                         r = k;
         }