]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: use prefix_roota() where appropriate
authorMike Yuan <me@yhndnzj.com>
Sun, 9 Feb 2025 14:38:40 +0000 (15:38 +0100)
committerMike Yuan <me@yhndnzj.com>
Sun, 9 Feb 2025 14:39:24 +0000 (15:39 +0100)
src/tmpfiles/tmpfiles.c

index a7d54bb1ff6b3ed7d73397deed81fa6042a91b97..139271623e6c63b884378ad3464ac53034c884c7 100644 (file)
@@ -2408,14 +2408,14 @@ static int create_symlink(Context *c, Item *i) {
         assert(i);
 
         if (i->ignore_if_target_missing) {
-                r = chase(i->argument, arg_root, CHASE_SAFE|CHASE_PREFIX_ROOT|CHASE_NOFOLLOW, /*ret_path=*/ NULL, /*ret_fd=*/ NULL);
+                r = chase(i->argument, arg_root, CHASE_SAFE|CHASE_PREFIX_ROOT|CHASE_NOFOLLOW, /* ret_path = */ NULL, /* ret_fd = */ NULL);
                 if (r == -ENOENT) {
                         /* Silently skip over lines where the source file is missing. */
-                        log_info("Symlink source path '%s%s' does not exist, skipping line.", strempty(arg_root), i->argument);
+                        log_info("Symlink source path '%s' does not exist, skipping line.", prefix_roota(arg_root, i->argument));
                         return 0;
                 }
                 if (r < 0)
-                        return log_error_errno(r, "Failed to check if symlink source path '%s%s' exists: %m", strempty(arg_root), i->argument);
+                        return log_error_errno(r, "Failed to check if symlink source path '%s' exists: %m", prefix_roota(arg_root, i->argument));
         }
 
         r = path_extract_filename(i->path, &bn);