summaryrefslogtreecommitdiff
path: root/source4/torture/raw
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-02 04:17:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:16 -0500
commit8692564e350db4dfa4a9ef4c4cb014d76b284d3b (patch)
tree891fbe0b3b55c4b7706bdb6ad8cd85c59cd070e2 /source4/torture/raw
parent5011f901aa0140ed60a0b58e80ab0f14810ba432 (diff)
downloadsamba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.tar.gz
samba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.tar.bz2
samba-8692564e350db4dfa4a9ef4c4cb014d76b284d3b.zip
r3458: more solaris portability fixes, the main one being that we can't use a
structure element called "open" as its a macro on solaris. (This used to be commit 4e92e15c4e396b1d8cd211192888fea68c2cf0f9)
Diffstat (limited to 'source4/torture/raw')
-rw-r--r--source4/torture/raw/open.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 03621dca45..81681bbd74 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -157,13 +157,13 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
printf("Checking RAW_OPEN_OPEN\n");
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.flags = OPEN_FLAGS_FCB;
- io.open.in.search_attrs = 0;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.flags = OPEN_FLAGS_FCB;
+ io.openold.in.search_attrs = 0;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_NOT_FOUND);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
smbcli_unlink(cli->tree, fname);
CREATE_FILE;
@@ -171,80 +171,80 @@ static BOOL test_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.open.out.fnum;
+ fnum2 = io.openold.out.fnum;
CHECK_RDWR(fnum2, RDWR_RDWR);
smbcli_close(cli->tree, fnum2);
smbcli_close(cli->tree, fnum);
/* check the read/write modes */
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.search_attrs = 0;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.search_attrs = 0;
- io.open.in.flags = OPEN_FLAGS_OPEN_READ;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
- io.open.in.flags = OPEN_FLAGS_OPEN_WRITE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_WRONLY);
smbcli_close(cli->tree, fnum);
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
smbcli_close(cli->tree, fnum);
/* check the share modes roughly - not a complete matrix */
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_WRITE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
CHECK_RDWR(fnum, RDWR_RDWR);
- if (io.open.in.flags != io.open.out.rmode) {
+ if (io.openold.in.flags != io.openold.out.rmode) {
printf("(%s) rmode should equal flags - 0x%x 0x%x\n",
- __location__, io.open.out.rmode, io.open.in.flags);
+ __location__, io.openold.out.rmode, io.openold.in.flags);
}
- io.open.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_NONE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_RDWR | OPEN_FLAGS_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_SHARING_VIOLATION);
- io.open.in.flags = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ | OPEN_FLAGS_DENY_NONE;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum2 = io.open.out.fnum;
+ fnum2 = io.openold.out.fnum;
CHECK_RDWR(fnum2, RDWR_RDONLY);
smbcli_close(cli->tree, fnum);
smbcli_close(cli->tree, fnum2);
/* check the returned write time */
- io.open.level = RAW_OPEN_OPEN;
- io.open.in.fname = fname;
- io.open.in.search_attrs = 0;
- io.open.in.flags = OPEN_FLAGS_OPEN_READ;
+ io.openold.level = RAW_OPEN_OPEN;
+ io.openold.in.fname = fname;
+ io.openold.in.search_attrs = 0;
+ io.openold.in.flags = OPEN_FLAGS_OPEN_READ;
status = smb_raw_open(cli->tree, mem_ctx, &io);
CHECK_STATUS(status, NT_STATUS_OK);
- fnum = io.open.out.fnum;
+ fnum = io.openold.out.fnum;
/* check other reply fields */
- CHECK_TIME(io.open.out.write_time, write_time);
- CHECK_ALL_INFO(io.open.out.size, size);
- CHECK_ALL_INFO(io.open.out.attrib, attrib & ~FILE_ATTRIBUTE_NONINDEXED);
+ CHECK_TIME(io.openold.out.write_time, write_time);
+ CHECK_ALL_INFO(io.openold.out.size, size);
+ CHECK_ALL_INFO(io.openold.out.attrib, attrib & ~FILE_ATTRIBUTE_NONINDEXED);
done:
smbcli_close(cli->tree, fnum);