]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: uaccess - do not log error when device node disappears
authorKay Sievers <kay@vrfy.org>
Wed, 5 Aug 2015 18:33:48 +0000 (20:33 +0200)
committerKay Sievers <kay@vrfy.org>
Wed, 5 Aug 2015 18:33:48 +0000 (20:33 +0200)
https://github.com/systemd/systemd/issues/875

src/udev/udev-builtin-uaccess.c

index 99bb91ae57cacafd9e1739ca453b99ca397ad3f7..43bab8af6388a3d34cb50c7a47c8147541f13403 100644 (file)
@@ -56,7 +56,7 @@ static int builtin_uaccess(struct udev_device *dev, int argc, char *argv[], bool
 
         r = devnode_acl(path, true, false, 0, true, uid);
         if (r < 0) {
-                log_error_errno(r, "Failed to apply ACL on %s: %m", path);
+                log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, r, "Failed to apply ACL on %s: %m", path);
                 goto finish;
         }
 
@@ -70,7 +70,7 @@ finish:
                 /* Better be safe than sorry and reset ACL */
                 k = devnode_acl(path, true, false, 0, false, 0);
                 if (k < 0) {
-                        log_error_errno(k, "Failed to apply ACL on %s: %m", path);
+                        log_full_errno(errno == ENOENT ? LOG_DEBUG : LOG_ERR, k, "Failed to apply ACL on %s: %m", path);
                         if (r >= 0)
                                 r = k;
                 }