From c3e03778d64de6294d5030c822774c67ce416fe8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Aug 2018 20:19:52 +0200 Subject: [PATCH] tmpfiles: return correct error variable after fd_reopen() --- src/tmpfiles/tmpfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 7b98e66cfbb..730f5bbc6df 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -1259,7 +1259,7 @@ static int fd_set_attribute(Item *item, int fd, const char *path, const struct s procfs_fd = fd_reopen(fd, O_RDONLY|O_CLOEXEC|O_NOATIME); if (procfs_fd < 0) - return log_error_errno(errno, "Failed to re-open '%s': %m", path); + return log_error_errno(procfs_fd, "Failed to re-open '%s': %m", path); r = chattr_fd(procfs_fd, f, item->attribute_mask); if (r < 0) -- 2.47.3