X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fmisc.c;h=64b1b2b3ea8b4104cff3a85d4d3ba14312b33a4b;hb=d9458886432a92230e432e8e8492703c7afb8272;hp=1cf0c3b666054da93446f44ae94dff1ae53dc3c0;hpb=ecbcb7b6d74c2d69386c8d7e435486a4690c9993;p=chaz%2Ftar diff --git a/src/misc.c b/src/misc.c index 1cf0c3b..64b1b2b 100644 --- a/src/misc.c +++ b/src/misc.c @@ -628,15 +628,17 @@ fd_utimensat (int fd, int parentfd, char const *file, return utimensat (parentfd, file, ts, atflag); } -/* Set FD's (i.e., FILE's) access time to ATIME. - ATFLAG controls symbolic-link following, in the style of openat. */ +/* Set FD's (i.e., assuming the working directory is PARENTFD, FILE's) + access time to ATIME. ATFLAG controls symbolic-link following, in + the style of openat. */ int -set_file_atime (int fd, char const *file, struct timespec atime, int atflag) +set_file_atime (int fd, int parentfd, char const *file, struct timespec atime, + int atflag) { struct timespec ts[2]; ts[0] = atime; ts[1].tv_nsec = UTIME_OMIT; - return fd_utimensat (fd, AT_FDCWD, file, ts, atflag); + return fd_utimensat (fd, parentfd, file, ts, atflag); } /* A description of a working directory. */