]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysupdate: fix error handling
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Mar 2022 03:26:13 +0000 (12:26 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 23 Mar 2022 07:52:55 +0000 (16:52 +0900)
src/sysupdate/sysupdate-resource.c

index 97d8973f71eb521e5b3c464968d8374962d109cc..3df34cf7fb2db565709bd3266a9a306c1590ea08 100644 (file)
@@ -557,7 +557,7 @@ int resource_resolve_path(
                         return log_error_errno(r, "Failed to resolve '%s': %m", rr->path);
 
                 if (fstat(fd, &st) < 0)
-                        return log_error_errno(r, "Failed to stat '%s': %m", resolved);
+                        return log_error_errno(errno, "Failed to stat '%s': %m", resolved);
 
                 if (S_ISBLK(st.st_mode) && root)
                         return log_error_errno(SYNTHETIC_ERRNO(EPERM), "When using --root= or --image= access to device nodes is prohibited.");