Author: jra Date: 2007-03-06 00:20:32 +0000 (Tue, 06 Mar 2007) New Revision: 21715
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21715 Log: Fix torture utime code. Jeremy. Modified: branches/SAMBA_3_0/source/torture/cmd_vfs.c branches/SAMBA_3_0_25/source/torture/cmd_vfs.c Changeset: Modified: branches/SAMBA_3_0/source/torture/cmd_vfs.c =================================================================== --- branches/SAMBA_3_0/source/torture/cmd_vfs.c 2007-03-05 23:40:03 UTC (rev 21714) +++ branches/SAMBA_3_0/source/torture/cmd_vfs.c 2007-03-06 00:20:32 UTC (rev 21715) @@ -783,14 +783,14 @@ 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], ×) != 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; } Modified: branches/SAMBA_3_0_25/source/torture/cmd_vfs.c =================================================================== --- branches/SAMBA_3_0_25/source/torture/cmd_vfs.c 2007-03-05 23:40:03 UTC (rev 21714) +++ branches/SAMBA_3_0_25/source/torture/cmd_vfs.c 2007-03-06 00:20:32 UTC (rev 21715) @@ -783,14 +783,14 @@ 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], ×) != 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; }