]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfile-util: don't log about lack of O_TMPFILE support
authorLennart Poettering <lennart@amutable.com>
Thu, 26 Mar 2026 17:11:30 +0000 (18:11 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Mar 2026 11:55:32 +0000 (11:55 +0000)
It's a very common case (vfat...), and it's just too much noise. After
all the whole function exists primarily to deal with O_TMPFILE not being
availeble everywhere...

src/basic/tmpfile-util.c

index be7a930c44c186f4e2eb78f2aae378e5abdfec96..9c2dc33f065d7668c9a2fa5b3deba3a747c6df7b 100644 (file)
@@ -294,7 +294,8 @@ int open_tmpfile_linkable_at(int dir_fd, const char *target, int flags, char **r
                 return fd;
         }
 
-        log_debug_errno(fd, "Failed to use O_TMPFILE for %s: %m", target);
+        if (!ERRNO_IS_NEG_NOT_SUPPORTED(fd))
+                log_debug_errno(fd, "Failed to use O_TMPFILE for %s: %m", target);
 
         _cleanup_free_ char *tmp = NULL;
         r = tempfn_random(target, NULL, &tmp);