]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: Fix BSD lock logging messages
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 6 Jun 2023 14:55:14 +0000 (16:55 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 20 Jun 2023 13:22:47 +0000 (15:22 +0200)
src/tmpfiles/tmpfiles.c

index 43e1285649544d85174f5c4c00083cc8be82d0ab..9469bbb4a3bfbf6c9ac5c6fe38fdc4760c71176e 100644 (file)
@@ -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;
                         }