From ecc1709c2c216ef9e3035dac3b40abfcc6609094 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Jan 2018 15:29:30 +0100 Subject: [PATCH] tmpfiles: fold five lines into two log_full_errno() has all these nice benefits, let's make use of them to shorten five lines into two. --- src/tmpfiles/tmpfiles.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 96ffa42089..66dabc74f1 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -547,11 +547,8 @@ static int dir_cleanup( continue; /* FUSE, NFS mounts, SELinux might return EACCES */ - if (errno == EACCES) - log_debug_errno(errno, "stat(%s/%s) failed: %m", p, dent->d_name); - else - log_error_errno(errno, "stat(%s/%s) failed: %m", p, dent->d_name); - r = -errno; + r = log_full_errno(errno == EACCES ? LOG_DEBUG : LOG_ERR, errno, + "stat(%s/%s) failed: %m", p, dent->d_name); continue; }