]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tmpfiles: return correct error variable after fd_reopen()
authorLennart Poettering <lennart@poettering.net>
Mon, 6 Aug 2018 18:19:52 +0000 (20:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Aug 2018 09:59:39 +0000 (11:59 +0200)
src/tmpfiles/tmpfiles.c

index 7b98e66cfbb231b780f7a57acd212820227c5fd3..730f5bbc6dff82c7e88269425ab098584f92b15f 100644 (file)
@@ -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)