From: Jeremy Allison Date: Tue, 6 Mar 2007 00:20:32 +0000 (+0000) Subject: r21715: Fix torture utime code. X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~997 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10430bf75accc71045ed359314dc2711fea8df01;p=thirdparty%2Fsamba.git r21715: Fix torture utime code. Jeremy. --- diff --git a/source/torture/cmd_vfs.c b/source/torture/cmd_vfs.c index 6cecd693f83..455ca1c82c7 100644 --- a/source/torture/cmd_vfs.c +++ b/source/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 \n"); return NT_STATUS_OK; } - times.actime = atoi(argv[2]); - times.modtime = atoi(argv[3]); - if (SMB_VFS_UTIME(vfs->conn, argv[1], ×) != 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; }