]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
virt: debug log when inode_same() fails
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 20 Nov 2025 15:36:39 +0000 (15:36 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Nov 2025 19:02:06 +0000 (20:02 +0100)
If this fails with an error there's no log messages and tests
typically don't log it either as they just check, so add a
message to aid in debugging

src/basic/virt.c

index ad4b9aa3eafddc659412b91938fe55608f386817..55d7c51270e57c759eea3782405321b987a226c4 100644 (file)
@@ -830,7 +830,7 @@ int running_in_chroot(void) {
                         return -ENOSYS;
         }
         if (r < 0)
-                return r;
+                return log_debug_errno(r, "Failed to check if /proc/1/root and / are the same inode: %m");
 
         return r == 0;
 }