Lines Matching refs:dir_fd

1163     int dir_fd;  in dir_fd_unavailable()  local
1164 if (!dir_fd_converter(o, &dir_fd)) in dir_fd_unavailable()
1166 if (dir_fd != DEFAULT_DIR_FD) { in dir_fd_unavailable()
1170 *(int *)p = dir_fd; in dir_fd_unavailable()
1195 path_and_dir_fd_invalid(const char *function_name, path_t *path, int dir_fd) in path_and_dir_fd_invalid() argument
1197 if (!path->wide && (dir_fd != DEFAULT_DIR_FD) in path_and_dir_fd_invalid()
1211 dir_fd_and_fd_invalid(const char *function_name, int dir_fd, int fd) in dir_fd_and_fd_invalid() argument
1213 if ((dir_fd != DEFAULT_DIR_FD) && (fd != -1)) { in dir_fd_and_fd_invalid()
1236 dir_fd_and_follow_symlinks_invalid(const char *function_name, int dir_fd, in dir_fd_and_follow_symlinks_invalid() argument
1239 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) { in dir_fd_and_follow_symlinks_invalid()
2110 int dir_fd, int follow_symlinks) in posix_do_stat() argument
2120 if (path_and_dir_fd_invalid("stat", path, dir_fd) || in posix_do_stat()
2121 dir_fd_and_fd_invalid("stat", dir_fd, path->fd) || in posix_do_stat()
2136 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in posix_do_stat()
2141 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) in posix_do_stat()
2142 result = fstatat(dir_fd, path->narrow, &st, in posix_do_stat()
2489 os_stat_impl(PyObject *module, path_t *path, int dir_fd, int follow_symlinks) in os_stat_impl() argument
2492 return posix_do_stat("stat", path, dir_fd, follow_symlinks); in os_stat_impl()
2512 os_lstat_impl(PyObject *module, path_t *path, int dir_fd) in os_lstat_impl() argument
2516 return posix_do_stat("lstat", path, dir_fd, follow_symlinks); in os_lstat_impl()
2560 os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd, in os_access_impl() argument
2603 if ((dir_fd != DEFAULT_DIR_FD) || in os_access_impl()
2611 result = faccessat(dir_fd, path->narrow, mode, flags); in os_access_impl()
2783 os_chmod_impl(PyObject *module, path_t *path, int mode, int dir_fd, in os_chmod_impl() argument
2827 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_chmod_impl()
2832 if ((dir_fd != DEFAULT_DIR_FD) || !follow_symlinks) { in os_chmod_impl()
2843 result = fchmodat(dir_fd, path->narrow, mode, in os_chmod_impl()
2862 if (dir_fd != DEFAULT_DIR_FD) in os_chmod_impl()
2864 dir_fd, follow_symlinks); in os_chmod_impl()
3142 int dir_fd, int follow_symlinks) in os_chown_impl() argument
3151 if (dir_fd_and_fd_invalid("chown", dir_fd, path->fd) || in os_chown_impl()
3175 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_chown_impl()
3180 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) in os_chown_impl()
3181 result = fchownat(dir_fd, path->narrow, uid, gid, in os_chown_impl()
3915 os_mkdir_impl(PyObject *module, path_t *path, int mode, int dir_fd) in os_mkdir_impl() argument
3930 if (dir_fd != DEFAULT_DIR_FD) in os_mkdir_impl()
3931 result = mkdirat(dir_fd, path->narrow, mode); in os_mkdir_impl()
4160 os_rmdir_impl(PyObject *module, path_t *path, int dir_fd) in os_rmdir_impl() argument
4171 if (dir_fd != DEFAULT_DIR_FD) in os_rmdir_impl()
4172 result = unlinkat(dir_fd, path->narrow, AT_REMOVEDIR); in os_rmdir_impl()
4308 os_unlink_impl(PyObject *module, path_t *path, int dir_fd) in os_unlink_impl() argument
4320 if (dir_fd != DEFAULT_DIR_FD) in os_unlink_impl()
4321 result = unlinkat(dir_fd, path->narrow, 0); in os_unlink_impl()
4348 os_remove_impl(PyObject *module, path_t *path, int dir_fd) in os_remove_impl() argument
4351 return os_unlink_impl(module, path, dir_fd); in os_remove_impl()
4499 utime_dir_fd(utime_t *ut, int dir_fd, const char *path, int follow_symlinks) in utime_dir_fd() argument
4504 return utimensat(dir_fd, path, time, flags); in utime_dir_fd()
4513 return futimesat(dir_fd, path, time); in utime_dir_fd()
4651 int dir_fd, int follow_symlinks) in os_utime_impl() argument
4717 if (path_and_dir_fd_invalid("utime", path, dir_fd) || in os_utime_impl()
4718 dir_fd_and_fd_invalid("utime", dir_fd, path->fd) || in os_utime_impl()
4723 if ((dir_fd != DEFAULT_DIR_FD) && (!follow_symlinks)) { in os_utime_impl()
4764 if ((!follow_symlinks) && (dir_fd == DEFAULT_DIR_FD)) in os_utime_impl()
4770 if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) in os_utime_impl()
4771 result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks); in os_utime_impl()
7159 int dir_fd = DEFAULT_DIR_FD; in posix_readlink() local
7169 READLINKAT_DIR_FD_CONVERTER, &dir_fd)) in posix_readlink()
7174 if (dir_fd != DEFAULT_DIR_FD) in posix_readlink()
7175 length = readlinkat(dir_fd, path.narrow, buffer, MAXPATHLEN); in posix_readlink()
7207 int dir_fd; in win_readlink() local
7218 dir_fd_unavailable, &dir_fd in win_readlink()
7393 int target_is_directory, int dir_fd) in os_symlink_impl() argument
7438 if (dir_fd != DEFAULT_DIR_FD) in os_symlink_impl()
7439 result = symlinkat(src->narrow, dir_fd, dst->narrow); in os_symlink_impl()
7711 os_open_impl(PyObject *module, path_t *path, int flags, int mode, int dir_fd) in os_open_impl() argument
7736 if (dir_fd != DEFAULT_DIR_FD) in os_open_impl()
7737 fd = openat(dir_fd, path->narrow, flags, mode); in os_open_impl()
8874 os_mkfifo_impl(PyObject *module, path_t *path, int mode, int dir_fd) in os_mkfifo_impl() argument
8883 if (dir_fd != DEFAULT_DIR_FD) in os_mkfifo_impl()
8884 result = mkfifoat(dir_fd, path->narrow, mode); in os_mkfifo_impl()
8926 int dir_fd) in os_mknod_impl() argument
8935 if (dir_fd != DEFAULT_DIR_FD) in os_mknod_impl()
8936 result = mknodat(dir_fd, path->narrow, mode, device); in os_mknod_impl()
11596 int dir_fd; member
11653 if (self->dir_fd != DEFAULT_DIR_FD) { in DirEntry_fetch_stat()
11655 result = fstatat(self->dir_fd, path, &st, in DirEntry_fetch_stat()
12079 entry->dir_fd = path->fd; in DirEntry_from_posix_info()
12083 entry->dir_fd = DEFAULT_DIR_FD; in DirEntry_from_posix_info()