From b572e8da4142fe23c67e28f1d6a232e14effba6e Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 6 Jun 2023 16:55:14 +0200 Subject: [PATCH] tmpfiles: Fix BSD lock logging messages --- src/tmpfiles/tmpfiles.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 43e12856495..9469bbb4a3b 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -720,7 +720,7 @@ static int dir_cleanup( } if (flock(dirfd(sub_dir), LOCK_EX|LOCK_NB) < 0) { - log_debug_errno(errno, "Couldn't acquire shared BSD lock on directory \"%s\", skipping: %m", p); + log_debug_errno(errno, "Couldn't acquire shared BSD lock on directory \"%s\", skipping: %m", sub_path); continue; } @@ -808,7 +808,7 @@ static int dir_cleanup( if (fd < 0 && fd != -ENOENT) log_warning_errno(fd, "Opening file \"%s\" failed, ignoring: %m", sub_path); if (fd >= 0 && flock(fd, LOCK_EX|LOCK_NB) < 0 && errno == EAGAIN) { - log_debug_errno(errno, "Couldn't acquire shared BSD lock on file \"%s\", skipping: %m", p); + log_debug_errno(errno, "Couldn't acquire shared BSD lock on file \"%s\", skipping: %m", sub_path); continue; } -- 2.47.3