summaryrefslogtreecommitdiffstats
path: root/examples
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
commit8f3d530c5a748ea90f42ed8fbe68ae92178d4875 (patch)
treed565d4dec26ef1dc17b9f76351138ffdddca58ff /examples
parentb73685d20751ac343faab79332552cd7ee92d831 (diff)
downloadsamba-8f3d530c5a748ea90f42ed8fbe68ae92178d4875.tar.gz
samba-8f3d530c5a748ea90f42ed8fbe68ae92178d4875.tar.xz
samba-8f3d530c5a748ea90f42ed8fbe68ae92178d4875.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.
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c6
-rw-r--r--examples/VFS/skel_transparent.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 096068da147..18ad5eb5172 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -211,9 +211,9 @@ static char *skel_getwd(vfs_handle_struct *handle, char *buf)
return vfswrap_getwd(NULL, buf);
}
-static int skel_utime(vfs_handle_struct *handle, const char *path, struct utimbuf *times)
+static int skel_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2])
{
- return vfswrap_utime(NULL, path, times);
+ return vfswrap_ntimes(NULL, path, ts);
}
static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T offset)
@@ -578,7 +578,7 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_fchown), SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_getwd), SMB_VFS_OP_GETWD, SMB_VFS_LAYER_OPAQUE},
- {SMB_VFS_OP(skel_utime), SMB_VFS_OP_UTIME, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_ftruncate), SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_lock), SMB_VFS_OP_LOCK, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_getlock), SMB_VFS_OP_GETLOCK, SMB_VFS_LAYER_OPAQUE},
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 2a379cd6d89..b967a337ebc 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -210,9 +210,9 @@ static char *skel_getwd(vfs_handle_struct *handle, char *buf)
return SMB_VFS_NEXT_GETWD(handle, buf);
}
-static int skel_utime(vfs_handle_struct *handle, const char *path, struct utimbuf *times)
+static int skel_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2])
{
- return SMB_VFS_NEXT_UTIME(handle, path, times);
+ return SMB_VFS_NEXT_NTIMES(handle, path, ts[2]);
}
static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, int fd, SMB_OFF_T offset)
@@ -545,7 +545,7 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_fchown), SMB_VFS_OP_FCHOWN, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_chdir), SMB_VFS_OP_CHDIR, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_getwd), SMB_VFS_OP_GETWD, SMB_VFS_LAYER_TRANSPARENT},
- {SMB_VFS_OP(skel_utime), SMB_VFS_OP_UTIME, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_ntimes), SMB_VFS_OP_NTIMES, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_ftruncate), SMB_VFS_OP_FTRUNCATE, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_lock), SMB_VFS_OP_LOCK, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_getlock), SMB_VFS_OP_GETLOCK, SMB_VFS_LAYER_TRANSPARENT},