summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-06 00:20:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:24 -0500
commitf41de9314b300d5092cf0ecef201fbe520040b8b (patch)
tree30130c2e828a9e967deabd440103b18baf405409 /source3/torture
parent4952fe368a40b239140b3035db6075427d237bb9 (diff)
downloadsamba-f41de9314b300d5092cf0ecef201fbe520040b8b.tar.gz
samba-f41de9314b300d5092cf0ecef201fbe520040b8b.tar.bz2
samba-f41de9314b300d5092cf0ecef201fbe520040b8b.zip
r21715: Fix torture utime code.
Jeremy. (This used to be commit 10430bf75accc71045ed359314dc2711fea8df01)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 6cecd693f8..455ca1c82c 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -783,14 +783,14 @@ static NTSTATUS cmd_getwd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
static NTSTATUS cmd_utime(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
- struct utimbuf times;
+ struct timespec ts[2];
if (argc != 4) {
printf("Usage: utime <path> <access> <modify>\n");
return NT_STATUS_OK;
}
- times.actime = atoi(argv[2]);
- times.modtime = atoi(argv[3]);
- if (SMB_VFS_UTIME(vfs->conn, argv[1], &times) != 0) {
+ ts[0] = convert_time_t_to_timespec(atoi(argv[2]));
+ ts[1] = convert_time_t_to_timespec(atoi(argv[3]));
+ if (SMB_VFS_NTIMES(vfs->conn, argv[1], ts) != 0) {
printf("utime: error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;
}