|
From: | Eric Blake |
Subject: | Re: [Bug-tar] [PATCH] two patches for --atime-preserve races and other problems |
Date: | Thu, 16 Sep 2010 12:17:52 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.3 |
On 09/16/2010 11:48 AM, Paul Eggert wrote:
@@ -621,24 +613,30 @@ deref_stat (bool deref, char const *name, struct stat *buf) return deref ? stat (name, buf) : lstat (name, buf); } -/* Set FD's (i.e., FILE's) access time to TIMESPEC[0]. If that's not - possible to do by itself, set its access and data modification - times to TIMESPEC[0] and TIMESPEC[1], respectively. */ +/* Use futimens if possible, utimensat otherwise. */ int -set_file_atime (int fd, char const *file, struct timespec const timespec[2]) +fd_utimensat (int fd, int parentfd, char const *file, + struct timespec const ts[2], int atflag)
Why not just use the gnulib module fdutimensat instead of reimplementing this yourself as fd_utimensat?
-- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |