Lines Matching defs:fd
30 #include "fd-util.h"
39 int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
43 assert(fd >= 0);
46 * tries to go on. This closes the passed fd. */
50 r = fd_is_temporary_fs(fd);
52 safe_close(fd);
64 safe_close(fd);
69 d = fdopendir(fd);
71 safe_close(fd);
93 if (fstatat(fd, de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
110 subdir_fd = openat(fd, de->d_name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
118 r = fd_is_mount_point(fd, de->d_name, 0);
135 r = btrfs_subvol_remove_fd(fd, de->d_name, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
162 if (unlinkat(fd, de->d_name, AT_REMOVEDIR) < 0) {
169 if (unlinkat(fd, de->d_name, 0) < 0) {
178 int fd, r;
203 fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
204 if (fd < 0) {
226 r = rm_rf_children(fd, flags, NULL);