diff options
author | Jilles Tjoelker <jilles@FreeBSD.org> | 2015-03-23 17:35:05 +0000 |
---|---|---|
committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2015-03-23 17:35:05 +0000 |
commit | 347b9f6de08d398e6b1dad1c200c2e14d55693dc (patch) | |
tree | c09f92320674225e164b0431dee8a057dfbceaf0 /bin/cp | |
parent | f0c61ded93d236d0803b01782a811280dd25e28d (diff) | |
download | src-test2-347b9f6de08d398e6b1dad1c200c2e14d55693dc.tar.gz src-test2-347b9f6de08d398e6b1dad1c200c2e14d55693dc.zip |
cp,mv: Use futimens() instead of utimensat() if possible.
Notes
Notes:
svn path=/head/; revision=280386
Diffstat (limited to 'bin/cp')
-rw-r--r-- | bin/cp/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c index e77a6c13a370..f58ed7a96f9b 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -342,7 +342,7 @@ setfile(struct stat *fs, int fd) tspec[0] = fs->st_atim; tspec[1] = fs->st_mtim; - if (utimensat(AT_FDCWD, to.p_path, tspec, + if (fdval ? futimens(fd, tspec) : utimensat(AT_FDCWD, to.p_path, tspec, islink ? AT_SYMLINK_NOFOLLOW : 0)) { warn("utimensat: %s", to.p_path); rval = 1; |