From: Kay Sievers Date: Wed, 5 Aug 2015 18:33:48 +0000 (+0200) Subject: udev: uaccess - do not log error when device node disappears X-Git-Tag: v225~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dbf626535136b6fe6e1cf7d4ff251b2f505087c;p=thirdparty%2Fsystemd.git udev: uaccess - do not log error when device node disappears https://github.com/systemd/systemd/issues/875 --- diff --git a/src/udev/udev-builtin-uaccess.c b/src/udev/udev-builtin-uaccess.c index 99bb91ae57c..43bab8af638 100644 --- a/src/udev/udev-builtin-uaccess.c +++ b/src/udev/udev-builtin-uaccess.c @@ -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; }