Lines Matching refs:dfd
571 int dfd; in _delete_dir_contents() local
573 dfd = dirfd(d); in _delete_dir_contents()
575 if (dfd < 0) return -1; in _delete_dir_contents()
595 subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); in _delete_dir_contents()
612 if (unlinkat(dfd, name, AT_REMOVEDIR) < 0) { in _delete_dir_contents()
617 if (unlinkat(dfd, name, 0) < 0) { in _delete_dir_contents()
746 int dfd = dirfd(dir.get()); in foreach_subdir() local
747 if (dfd < 0) { in foreach_subdir()
774 int dfd = dirfd(dir.get()); in cleanup_invalid_package_dirs_under_path() local
775 if (dfd < 0) { in cleanup_invalid_package_dirs_under_path()
796 delete_dir_contents_fd(dfd, name.c_str()); in cleanup_invalid_package_dirs_under_path()
798 if (unlinkat(dfd, name.c_str(), AT_REMOVEDIR) < 0) { in cleanup_invalid_package_dirs_under_path()
805 int delete_dir_contents_fd(int dfd, const char *name) in delete_dir_contents_fd() argument
810 fd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); in delete_dir_contents_fd()