Lines Matching refs:opened_fd
89 _cleanup_close_ int opened_fd = -1; in fsync_path_at() local
94 opened_fd = open(".", O_RDONLY|O_DIRECTORY|O_CLOEXEC); in fsync_path_at()
95 if (opened_fd < 0) in fsync_path_at()
98 fd = opened_fd; in fsync_path_at()
102 opened_fd = openat(at_fd, path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); in fsync_path_at()
103 if (opened_fd < 0) in fsync_path_at()
106 fd = opened_fd; in fsync_path_at()
113 _cleanup_close_ int opened_fd = -1; in fsync_parent_at() local
119 opened_fd = open("..", O_RDONLY|O_DIRECTORY|O_CLOEXEC); in fsync_parent_at()
120 if (opened_fd < 0) in fsync_parent_at()
123 return RET_NERRNO(fsync(opened_fd)); in fsync_parent_at()
126 opened_fd = openat(at_fd, path, O_PATH|O_CLOEXEC|O_NOFOLLOW); in fsync_parent_at()
127 if (opened_fd < 0) in fsync_parent_at()
130 return fsync_directory_of_file(opened_fd); in fsync_parent_at()
134 _cleanup_close_ int opened_fd = -1; in fsync_path_and_parent_at() local
140 opened_fd = open(".", O_RDONLY|O_DIRECTORY|O_CLOEXEC); in fsync_path_and_parent_at()
142 opened_fd = openat(at_fd, path, O_RDONLY|O_NOFOLLOW|O_NONBLOCK|O_CLOEXEC); in fsync_path_and_parent_at()
143 if (opened_fd < 0) in fsync_path_and_parent_at()
146 return fsync_full(opened_fd); in fsync_path_and_parent_at()