summaryrefslogtreecommitdiff
path: root/source3/include/vfs.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-05 23:40:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:24 -0500
commit4952fe368a40b239140b3035db6075427d237bb9 (patch)
tree4522aa1bd6ec5f4b627aa7fa2868297e4dcea99f /source3/include/vfs.h
parent242927bd5cae1d2ab8739b1c424e702ab97726b5 (diff)
downloadsamba-4952fe368a40b239140b3035db6075427d237bb9.tar.gz
samba-4952fe368a40b239140b3035db6075427d237bb9.tar.bz2
samba-4952fe368a40b239140b3035db6075427d237bb9.zip
r21714: Change the VFS interface to use struct timespec
for utimes - change the call to ntimes. This preserves nsec timestamps we get from stat (if the system supports it) and only maps back down to usec or sec resolution on time set. Looks bigger than it is as I had to move lots of internal code from using time_t and struct utimebuf to struct timespec. Jeremy. (This used to be commit 8f3d530c5a748ea90f42ed8fbe68ae92178d4875)
Diffstat (limited to 'source3/include/vfs.h')
-rw-r--r--source3/include/vfs.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 4c2b559bea..7bcd6cdf2c 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -67,7 +67,9 @@
Also include kernel_flock call - jmcd */
/* Changed to version 19, kernel change notify has been merged
Also included linux setlease call - jmcd */
-#define SMB_VFS_INTERFACE_VERSION 19
+/* Changed to version 20, use ntimes call instead of utime (greater
+ * timestamp resolition. JRA. */
+#define SMB_VFS_INTERFACE_VERSION 20
/* to bug old modules which are trying to compile with the old functions */
@@ -144,7 +146,7 @@ typedef enum _vfs_op_type {
SMB_VFS_OP_FCHOWN,
SMB_VFS_OP_CHDIR,
SMB_VFS_OP_GETWD,
- SMB_VFS_OP_UTIME,
+ SMB_VFS_OP_NTIMES,
SMB_VFS_OP_FTRUNCATE,
SMB_VFS_OP_LOCK,
SMB_VFS_OP_KERNEL_FLOCK,
@@ -269,7 +271,7 @@ struct vfs_ops {
int (*fchown)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uid_t uid, gid_t gid);
int (*chdir)(struct vfs_handle_struct *handle, const char *path);
char *(*getwd)(struct vfs_handle_struct *handle, char *buf);
- int (*utime)(struct vfs_handle_struct *handle, const char *path, struct utimbuf *times);
+ int (*ntimes)(struct vfs_handle_struct *handle, const char *path, const struct timespec ts[2]);
int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_OFF_T offset);
BOOL (*lock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
int (*kernel_flock)(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, uint32 share_mode);
@@ -392,7 +394,7 @@ struct vfs_ops {
struct vfs_handle_struct *fchown;
struct vfs_handle_struct *chdir;
struct vfs_handle_struct *getwd;
- struct vfs_handle_struct *utime;
+ struct vfs_handle_struct *ntimes;
struct vfs_handle_struct *ftruncate;
struct vfs_handle_struct *lock;
struct vfs_handle_struct *kernel_flock;