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,
1839 int dirfd = -1;
1861 dirfd = attrinfo->attr_parentfd;
1864 dirfd = open(".", O_RDONLY);
1867 if (dirfd == -1) {
1885 if (getstat(dirfd, longname, shortname, attrparent))
1892 j = fstatat(dirfd, shortname, &sbuf, AT_SYMLINK_NOFOLLOW);
2310 if ((infile = openat(dirfd, shortname, 0)) < 0) {
2338 (void) close(dirfd);
2431 (void) close(dirfd);
2479 (void) close(dirfd);
2526 (void) close(dirfd);
2569 if ((dirfd != -1) && (filetype != XATTR_FILE)) {
2570 (void) close(dirfd);
2937 int dirfd = -1;
2980 if (dirfd != -1) {
2981 (void) close(dirfd);
2982 dirfd = -1;
3031 if (dirfd != -1)
3032 (void) close(dirfd);
3066 dirfd = attrinfo->attr_parentfd;
3070 dirfd = open(dirp, O_RDONLY);
3073 dirfd = open(dirp, O_RDONLY);
3075 if (dirfd == -1) {
3174 if (fchownat(dirfd, ".", stbuf.st_uid,
3182 if (fchmod(dirfd, stbuf.st_mode) != 0) {
3371 if (unlinkat(dirfd, comp, AT_REMOVEDIR) < 0) {
3373 (void) unlinkat(dirfd, comp, 0);
3377 if (fchdir(dirfd) < 0) {
3445 delete_target(dirfd, comp, namep);
3470 newfile = ((fstatat(dirfd, comp,
3472 ofile = openat(dirfd, comp, O_RDWR|O_CREAT|O_TRUNC,
3479 ofile = retry_open_attr(dirfd, cwd,
3588 setPathTimes(dirfd, comp,
3592 setPathTimes(dirfd, comp,
3595 setPathTimes(dirfd, comp, stbuf.st_mtim);
3620 ret = facl_set(dirfd, aclp);
3649 resugname(dirfd, comp, symflag);
3692 (void) close(dirfd);
3693 dirfd = -1;
4519 resugname(int dirfd, /* dir fd file resides in */
4573 (void) fchownat(dirfd, name, duid, dgid, symflag);
6616 setPathTimes(int dirfd, char *path, timestruc_t modTime)
6635 if (futimesat(dirfd, path, timebuf) < 0)
7743 getstat(int dirfd, char *longname, char *shortname, char *attrparent)
7752 i = fstatat(dirfd, shortname, &stbuf, AT_SYMLINK_NOFOLLOW);
7754 i = fstatat(dirfd, shortname, &stbuf, 0);
7767 j = fstatat(dirfd, shortname,
7834 int dirfd;
7924 if (((dirfd = dup(fd)) == -1) ||
7925 ((dirp = fdopendir(dirfd)) == NULL)) {
8415 int dirfd;
8439 if ((dirfd = openat(cwd, (pattr == NULL) ? dirp : pattr,
8443 if (fstat(dirfd, &parentstat) == -1) {
8450 if ((error = facl_get(dirfd, ACL_NO_TRIVIAL, &aclp)) != 0) {
8459 if (fchmod(dirfd, newmode) == -1) {
8488 if (fchmod(dirfd, parentstat.st_mode) == -1) {
8496 error = facl_set(dirfd, aclp);
8518 (void) close(dirfd);
8559 unlinkat(int dirfd, char *path, int flag)