]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
discover-image: pass the right error variable
authorDavid Tardon <dtardon@redhat.com>
Tue, 7 May 2024 07:07:54 +0000 (09:07 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 7 May 2024 10:44:03 +0000 (12:44 +0200)
src/shared/discover-image.c

index 4e7a2049cf4f1fde1e83a2cfd173676df3cb3a29..09bad987ad4c698eb5929a9e90fdd836bdad9274 100644 (file)
@@ -1447,7 +1447,7 @@ int image_read_metadata(Image *i, const ImagePolicy *image_policy) {
                 else if (r >= 0) {
                         r = read_etc_hostname(path, &hostname);
                         if (r < 0)
-                                log_debug_errno(errno, "Failed to read /etc/hostname of image %s: %m", i->name);
+                                log_debug_errno(r, "Failed to read /etc/hostname of image %s: %m", i->name);
                 }
 
                 path = mfree(path);