diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-10 20:49:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:56:57 -0500 |
commit | 307e43bb5628e8b53a930c2928279af994281ba5 (patch) | |
tree | 68fa41cf4e697ae94b23cedab5eb7013932fc88d /source4/torture/nbench | |
parent | 2b3767b1fe7744f0412531e1522e1d5af5dc39c6 (diff) | |
download | samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.gz samba-307e43bb5628e8b53a930c2928279af994281ba5.tar.bz2 samba-307e43bb5628e8b53a930c2928279af994281ba5.zip |
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)
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r-- | source4/torture/nbench/nbio.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c index 863ddae83f..c5cebdc8d2 100644 --- a/source4/torture/nbench/nbio.c +++ b/source4/torture/nbench/nbio.c @@ -221,14 +221,14 @@ static void check_status(const char *op, NTSTATUS status, NTSTATUS ret) void nb_unlink(const char *fname, int attr, NTSTATUS status) { - struct smb_unlink io; + union smb_unlink io; NTSTATUS ret; - io.in.pattern = fname; + io.unlink.in.pattern = fname; - io.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; + io.unlink.in.attrib = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN; if (strchr(fname, '*') == 0) { - io.in.attrib |= FILE_ATTRIBUTE_DIRECTORY; + io.unlink.in.attrib |= FILE_ATTRIBUTE_DIRECTORY; } ret = smb_raw_unlink(c->tree, &io); @@ -286,7 +286,7 @@ void nb_createx(const char *fname, f = malloc_p(struct ftable); f->handle = handle; - f->fd = io.ntcreatex.out.fnum; + f->fd = io.ntcreatex.file.fnum; DLIST_ADD_END(ftable, f, struct ftable *); } @@ -306,7 +306,7 @@ void nb_writex(int handle, int offset, int size, int ret_size, NTSTATUS status) memset(buf, 0xab, size); io.writex.level = RAW_WRITE_WRITEX; - io.writex.in.fnum = i; + io.writex.file.fnum = i; io.writex.in.wmode = 0; io.writex.in.remaining = 0; io.writex.in.offset = offset; @@ -344,7 +344,7 @@ void nb_write(int handle, int offset, int size, int ret_size, NTSTATUS status) memset(buf, 0x12, size); io.write.level = RAW_WRITE_WRITE; - io.write.in.fnum = i; + io.write.file.fnum = i; io.write.in.remaining = 0; io.write.in.offset = offset; io.write.in.count = size; @@ -380,7 +380,7 @@ void nb_lockx(int handle, uint_t offset, int size, NTSTATUS status) lck.count = size; io.lockx.level = RAW_LOCK_LOCKX; - io.lockx.in.fnum = i; + io.lockx.file.fnum = i; io.lockx.in.mode = 0; io.lockx.in.timeout = 0; io.lockx.in.ulock_cnt = 0; @@ -406,7 +406,7 @@ void nb_unlockx(int handle, uint_t offset, int size, NTSTATUS status) lck.count = size; io.lockx.level = RAW_LOCK_LOCKX; - io.lockx.in.fnum = i; + io.lockx.file.fnum = i; io.lockx.in.mode = 0; io.lockx.in.timeout = 0; io.lockx.in.ulock_cnt = 1; @@ -432,7 +432,7 @@ void nb_readx(int handle, int offset, int size, int ret_size, NTSTATUS status) buf = malloc(size); io.readx.level = RAW_READ_READX; - io.readx.in.fnum = i; + io.readx.file.fnum = i; io.readx.in.offset = offset; io.readx.in.mincnt = size; io.readx.in.maxcnt = size; @@ -464,7 +464,7 @@ void nb_close(int handle, NTSTATUS status) i = find_handle(handle); io.close.level = RAW_CLOSE_CLOSE; - io.close.in.fnum = i; + io.close.file.fnum = i; io.close.in.write_time = 0; ret = smb_raw_close(c->tree, &io); @@ -526,7 +526,7 @@ void nb_qpathinfo(const char *fname, int level, NTSTATUS status) mem_ctx = talloc_init("nb_qpathinfo"); io.generic.level = level; - io.generic.in.fname = fname; + io.generic.file.path = fname; ret = smb_raw_pathinfo(c->tree, mem_ctx, &io); @@ -548,7 +548,7 @@ void nb_qfileinfo(int fnum, int level, NTSTATUS status) mem_ctx = talloc_init("nb_qfileinfo"); io.generic.level = level; - io.generic.in.fnum = i; + io.generic.file.fnum = i; ret = smb_raw_fileinfo(c->tree, mem_ctx, &io); @@ -637,12 +637,12 @@ void nb_findfirst(const char *mask, int level, int maxcnt, int count, NTSTATUS s void nb_flush(int fnum, NTSTATUS status) { - struct smb_flush io; + union smb_flush io; NTSTATUS ret; int i; i = find_handle(fnum); - io.in.fnum = i; + io.flush.file.fnum = i; ret = smb_raw_flush(c->tree, &io); |