From 307e43bb5628e8b53a930c2928279af994281ba5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2006 20:49:20 +0000 Subject: r14173: change smb interface structures to always use a union smb_file, to abtract - const char *path fot qpathinfo and setpathinfo - uint16_t fnum for SMB - smb2_handle handle for SMB2 the idea is to later add a struct ntvfs_handle *ntvfs so that the ntvfs subsystem don't need to know the difference between SMB and SMB2 metze (This used to be commit 2ef3f5970901b5accdb50f0d0115b5d46b0c788f) --- source4/torture/raw/close.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source4/torture/raw/close.c') diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c index e19fe0f3cb..8a82a46acc 100644 --- a/source4/torture/raw/close.c +++ b/source4/torture/raw/close.c @@ -33,7 +33,7 @@ BOOL torture_raw_close(void) BOOL ret = True; TALLOC_CTX *mem_ctx; union smb_close io; - struct smb_flush io_flush; + union smb_flush io_flush; int fnum; const char *fname = "\\torture_close.txt"; time_t basetime = (time(NULL) + 3*86400) & ~1; @@ -65,7 +65,7 @@ BOOL torture_raw_close(void) REOPEN; io.close.level = RAW_CLOSE_CLOSE; - io.close.in.fnum = fnum; + io.close.file.fnum = fnum; io.close.in.write_time = basetime; status = smb_raw_close(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_OK); @@ -76,8 +76,8 @@ BOOL torture_raw_close(void) printf("testing close.in.write_time\n"); /* the file should have the write time set */ - finfo.generic.in.fname = fname; finfo.generic.level = RAW_FILEINFO_ALL_INFO; + finfo.generic.file.path = fname; status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); CHECK_STATUS(status, NT_STATUS_OK); @@ -107,20 +107,20 @@ BOOL torture_raw_close(void) smbcli_unlink(cli->tree, fname); REOPEN; - finfo2.generic.in.fname = fname; finfo2.generic.level = RAW_FILEINFO_ALL_INFO; + finfo2.generic.file.path = fname; status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo2); CHECK_STATUS(status, NT_STATUS_OK); io.close.level = RAW_CLOSE_CLOSE; - io.close.in.fnum = fnum; + io.close.file.fnum = fnum; io.close.in.write_time = 0; status = smb_raw_close(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_OK); /* the file should have the write time set equal to access time */ - finfo.generic.in.fname = fname; finfo.generic.level = RAW_FILEINFO_ALL_INFO; + finfo.generic.file.path = fname; status = smb_raw_pathinfo(cli->tree, mem_ctx, &finfo); CHECK_STATUS(status, NT_STATUS_OK); @@ -136,31 +136,31 @@ BOOL torture_raw_close(void) /* check splclose on a file */ REOPEN; io.splclose.level = RAW_CLOSE_SPLCLOSE; - io.splclose.in.fnum = fnum; + io.splclose.file.fnum = fnum; status = smb_raw_close(cli->tree, &io); CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRerror)); printf("testing flush\n"); smbcli_close(cli->tree, fnum); - io_flush.in.fnum = fnum; + io_flush.flush.file.fnum = fnum; status = smb_raw_flush(cli->tree, &io_flush); CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE); - io_flush.in.fnum = 0xffff; + io_flush.flush.file.fnum = 0xffff; status = smb_raw_flush(cli->tree, &io_flush); CHECK_STATUS(status, NT_STATUS_OK); REOPEN; - io_flush.in.fnum = fnum; + io_flush.flush.file.fnum = fnum; status = smb_raw_flush(cli->tree, &io_flush); CHECK_STATUS(status, NT_STATUS_OK); printf("Testing SMBexit\n"); smb_raw_exit(cli->session); - io_flush.in.fnum = fnum; + io_flush.flush.file.fnum = fnum; status = smb_raw_flush(cli->tree, &io_flush); CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE); -- cgit