Lines Matching defs:dirfd
459 static void setPathTimes(int dirfd, char *path, timestruc_t modTime);
467 static void resugname(int dirfd, char *name, int symflag);
514 static int getstat(int dirfd, char *longname, char *shortname,
1840 int dirfd = -1;
1862 dirfd = attrinfo->attr_parentfd;
1865 dirfd = open(".", O_RDONLY);
1868 if (dirfd == -1) {
1886 if (getstat(dirfd, longname, shortname, attrparent))
1893 j = fstatat(dirfd, shortname, &sbuf, AT_SYMLINK_NOFOLLOW);
2311 if ((infile = openat(dirfd, shortname, 0)) < 0) {
2339 (void) close(dirfd);
2432 (void) close(dirfd);
2480 (void) close(dirfd);
2527 (void) close(dirfd);
2570 if ((dirfd != -1) && (filetype != XATTR_FILE)) {
2571 (void) close(dirfd);
2938 int dirfd = -1;
2981 if (dirfd != -1) {
2982 (void) close(dirfd);
2983 dirfd = -1;
3032 if (dirfd != -1)
3033 (void) close(dirfd);
3067 dirfd = attrinfo->attr_parentfd;
3071 dirfd = open(dirp, O_RDONLY);
3074 dirfd = open(dirp, O_RDONLY);
3076 if (dirfd == -1) {
3175 if (fchownat(dirfd, ".", stbuf.st_uid,
3183 if (fchmod(dirfd, stbuf.st_mode) != 0) {
3372 if (unlinkat(dirfd, comp, AT_REMOVEDIR) < 0) {
3374 (void) unlinkat(dirfd, comp, 0);
3378 if (fchdir(dirfd) < 0) {
3446 delete_target(dirfd, comp, namep);
3471 newfile = ((fstatat(dirfd, comp,
3473 ofile = openat(dirfd, comp, O_RDWR|O_CREAT|O_TRUNC,
3480 ofile = retry_open_attr(dirfd, cwd,
3589 setPathTimes(dirfd, comp,
3593 setPathTimes(dirfd, comp,
3596 setPathTimes(dirfd, comp, stbuf.st_mtim);
3621 ret = facl_set(dirfd, aclp);
3650 resugname(dirfd, comp, symflag);
3693 (void) close(dirfd);
3694 dirfd = -1;
4520 resugname(int dirfd, /* dir fd file resides in */
4574 (void) fchownat(dirfd, name, duid, dgid, symflag);
6618 setPathTimes(int dirfd, char *path, timestruc_t modTime)
6636 if (futimesat(dirfd, path, timebuf) < 0)
7744 getstat(int dirfd, char *longname, char *shortname, char *attrparent)
7753 i = fstatat(dirfd, shortname, &stbuf, AT_SYMLINK_NOFOLLOW);
7755 i = fstatat(dirfd, shortname, &stbuf, 0);
7768 j = fstatat(dirfd, shortname,
7835 int dirfd;
7925 if (((dirfd = dup(fd)) == -1) ||
7926 ((dirp = fdopendir(dirfd)) == NULL)) {
8416 int dirfd;
8440 if ((dirfd = openat(cwd, (pattr == NULL) ? dirp : pattr,
8444 if (fstat(dirfd, &parentstat) == -1) {
8451 if ((error = facl_get(dirfd, ACL_NO_TRIVIAL, &aclp)) != 0) {
8460 if (fchmod(dirfd, newmode) == -1) {
8489 if (fchmod(dirfd, parentstat.st_mode) == -1) {
8497 error = facl_set(dirfd, aclp);
8519 (void) close(dirfd);
8560 unlinkat(int dirfd, char *path, int flag)