summaryrefslogtreecommitdiff
path: root/src/sysupdate
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-03-23 12:26:13 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-03-23 16:52:55 +0900
commit7a692931ab1ce92916edf737837b7ff5cf87a2e9 (patch)
tree7746bb5cb9fc0f5f126eeb6c5488a2262937235b /src/sysupdate
parent60f53dd5cccce4d775fcce9456c95ddd03eb3dfc (diff)
downloadsystemd-7a692931ab1ce92916edf737837b7ff5cf87a2e9.tar.gz
sysupdate: fix error handling
Diffstat (limited to 'src/sysupdate')
-rw-r--r--src/sysupdate/sysupdate-resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sysupdate/sysupdate-resource.c b/src/sysupdate/sysupdate-resource.c
index 97d8973f71..3df34cf7fb 100644
--- a/src/sysupdate/sysupdate-resource.c
+++ b/src/sysupdate/sysupdate-resource.c
@@ -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.");