[SCM] Samba Shared Repository - branch v3-5-test updated
Björn Jacke
bjacke at samba.org
Thu Dec 10 13:32:02 MST 2009
The branch, v3-5-test has been updated
via faccec7... s3: keep subsecond times on cross-filesystem moves and don't follow links
from fd30552... s3:packaging: Fix version detection.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit faccec7b97b469b170932f27d8b7e0baf985a909
Author: Björn Jacke <bj at sernet.de>
Date: Wed Dec 9 02:06:17 2009 +0100
s3: keep subsecond times on cross-filesystem moves and don't follow links
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_default.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index ded4b1a..6e2a571 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -540,6 +540,27 @@ static int copy_reg(const char *source, const char *dest)
return -1;
/* Try to copy the old file's modtime and access time. */
+#if defined(HAVE_UTIMENSAT)
+ {
+ struct timespec ts[2];
+
+ ts[0] = source_stats.st_ex_atime;
+ ts[1] = source_stats.st_ex_mtime;
+ utimensat(AT_FDCWD, dest, ts, AT_SYMLINK_NOFOLLOW);
+ }
+#elif defined(HAVE_UTIMES)
+ {
+ struct timeval tv[2];
+
+ tv[0] = convert_timespec_to_timeval(source_stats.st_ex_atime);
+ tv[1] = convert_timespec_to_timeval(source_stats.st_ex_mtime);
+#ifdef HAVE_LUTIMES
+ lutimes(dest, tv);
+#else
+ utimes(dest, tv);
+#endif
+ }
+#elif defined(HAVE_UTIME)
{
struct utimbuf tv;
@@ -547,6 +568,7 @@ static int copy_reg(const char *source, const char *dest)
tv.modtime = convert_timespec_to_time_t(source_stats.st_ex_mtime);
utime(dest, &tv);
}
+#endif
if (unlink (source) == -1)
return -1;
--
Samba Shared Repository
More information about the samba-cvs
mailing list