]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Improve error logging for fstat failure
authorDan Anderson <dan@kd2ycu.com>
Thu, 30 Apr 2026 02:53:10 +0000 (22:53 -0400)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Apr 2026 06:05:54 +0000 (08:05 +0200)
Small hygiene fix.  r must be >= 0 as per the prior statement (otherwise we would have returned).  This is really only going to be r == 0, which means return r; is return 0;  I'm updating this to use log_debug_errno

src/mountfsd/mountwork.c

index 54a5203da2cc677c0d37a3c45383b69c7f83abbf..9f469d6061fdecb26d59412f2e109cb853f7fcdf 100644 (file)
@@ -1362,7 +1362,7 @@ static int vl_method_make_directory(
 
         struct stat parent_stat;
         if (fstat(parent_fd, &parent_stat) < 0)
-                return r;
+                return log_debug_errno(errno, "Failed to fstat parent directory fd: %m");
 
         r = stat_verify_directory(&parent_stat);
         if (r < 0)