summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_fileinfo.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-24 00:44:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:06 -0500
commitcb0cd473a0c7d3d7565fccdc9be30cefd19a0473 (patch)
tree9a6c4cfcaea6f35d4a8c88c68bf432658363567a /source4/ntvfs/posix/pvfs_fileinfo.c
parent9c89a30113df8b5a2ebf971f5e1fbb32ba1dc40c (diff)
downloadsamba-cb0cd473a0c7d3d7565fccdc9be30cefd19a0473.tar.gz
samba-cb0cd473a0c7d3d7565fccdc9be30cefd19a0473.tar.bz2
samba-cb0cd473a0c7d3d7565fccdc9be30cefd19a0473.zip
r2573: - added a configure test for nanosecond time resolution in struct stat
(recently Linux systems support this, allowing us to support the full resolution in NTTIME) - use nanosecond resolution in the posix backend if available - moved the configure tests and list of object files for the posix backend into ntvfs/posix/ to keep them more neatlly separated. (This used to be commit d92ad9f307fe16a3b253a0555b437f14c94b4dd7)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_fileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_fileinfo.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_fileinfo.c b/source4/ntvfs/posix/pvfs_fileinfo.c
index be559cf179..77eb10422d 100644
--- a/source4/ntvfs/posix/pvfs_fileinfo.c
+++ b/source4/ntvfs/posix/pvfs_fileinfo.c
@@ -139,6 +139,12 @@ NTSTATUS pvfs_fill_dos_info(struct pvfs_state *pvfs, struct pvfs_filename *name)
unix_to_nt_time(&name->dos.access_time, name->st.st_atime);
unix_to_nt_time(&name->dos.write_time, name->st.st_mtime);
unix_to_nt_time(&name->dos.change_time, name->st.st_mtime);
+#ifdef HAVE_STAT_TV_NSEC
+ name->dos.create_time += name->st.st_ctim.tv_nsec / 100;
+ name->dos.access_time += name->st.st_atim.tv_nsec / 100;
+ name->dos.write_time += name->st.st_mtim.tv_nsec / 100;
+ name->dos.change_time += name->st.st_mtim.tv_nsec / 100;
+#endif
name->dos.attrib = dos_mode_from_stat(pvfs, &name->st);
name->dos.alloc_size = name->st.st_size;
name->dos.nlink = name->st.st_nlink;