diff --git a/src/core/namespace.c b/src/core/namespace.c index f1a97ec631..0bc10cd335 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -930,7 +930,7 @@ static int mount_private_dev(MountEntry *m) { r = label_fix_container(dev, "/dev", 0); if (r < 0) { - log_debug_errno(errno, "Failed to fix label of '%s' as /dev: %m", dev); + log_debug_errno(r, "Failed to fix label of '%s' as /dev: %m", dev); goto fail; } diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 6aaf31867d..6c64f57d27 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -596,7 +596,7 @@ static int dir_cleanup( continue; if (r < 0) { /* FUSE, NFS mounts, SELinux might return EACCES */ - r = log_full_errno(errno == EACCES ? LOG_DEBUG : LOG_ERR, errno, + r = log_full_errno(r == -EACCES ? LOG_DEBUG : LOG_ERR, r, "statx(%s/%s) failed: %m", p, de->d_name); continue; }