diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-03-12 22:48:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:57:06 -0500 |
commit | a1b295ed4823ce8d06f830b8db9a5d965c934b54 (patch) | |
tree | 2de735a28634c011930456f6591072a3c1471263 /source4/client | |
parent | 33647bd841c1c74e7dc50e93379e372056ac2df1 (diff) | |
download | samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.gz samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.tar.bz2 samba-a1b295ed4823ce8d06f830b8db9a5d965c934b54.zip |
r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo
metze
(This used to be commit be6d5298a2cdb7e7c61d70471bad445645af5963)
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/cifsddio.c | 40 | ||||
-rw-r--r-- | source4/client/client.c | 6 |
2 files changed, 23 insertions, 23 deletions
diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c index c66cb5eeee..05e98f60bb 100644 --- a/source4/client/cifsddio.c +++ b/source4/client/cifsddio.c @@ -140,7 +140,7 @@ static struct dd_iohandle * open_fd_handle(const char * path, /* CIFS client IO. */ /* ------------------------------------------------------------------------- */ -struct smb_handle +struct cifs_handle { struct dd_iohandle h; struct smbcli_state * cli; @@ -148,7 +148,7 @@ struct smb_handle uint64_t offset; }; -#define IO_HANDLE_TO_SMB(h) ((struct smb_handle *)(h)) +#define IO_HANDLE_TO_SMB(h) ((struct cifs_handle *)(h)) BOOL smb_seek_func(void * handle, uint64_t offset) { @@ -163,17 +163,17 @@ BOOL smb_read_func(void * handle, { NTSTATUS ret; union smb_read r; - struct smb_handle * smbh; + struct cifs_handle * smbh; ZERO_STRUCT(r); smbh = IO_HANDLE_TO_SMB(handle); - r.generic.level = RAW_READ_READX; - r.readx.file.fnum = smbh->fnum; - r.readx.in.offset = smbh->offset; - r.readx.in.mincnt = wanted; - r.readx.in.maxcnt = wanted; - r.readx.out.data = buf; + r.generic.level = RAW_READ_READX; + r.readx.in.file.fnum = smbh->fnum; + r.readx.in.offset = smbh->offset; + r.readx.in.mincnt = wanted; + r.readx.in.maxcnt = wanted; + r.readx.out.data = buf; /* FIXME: Should I really set readx.in.remaining? That just seems * redundant. @@ -201,16 +201,16 @@ BOOL smb_write_func(void * handle, { NTSTATUS ret; union smb_write w; - struct smb_handle * smbh; + struct cifs_handle * smbh; ZERO_STRUCT(w); smbh = IO_HANDLE_TO_SMB(handle); - w.generic.level = RAW_WRITE_WRITEX; - w.writex.file.fnum = smbh->fnum; - w.writex.in.offset = smbh->offset; - w.writex.in.count = wanted; - w.writex.in.data = buf; + w.generic.level = RAW_WRITE_WRITEX; + w.writex.in.file.fnum = smbh->fnum; + w.writex.in.offset = smbh->offset; + w.writex.in.count = wanted; + w.writex.in.data = buf; ret = smb_raw_write(smbh->cli->tree, &w); if (!NT_STATUS_IS_OK(ret)) { @@ -290,16 +290,16 @@ static int open_smb_file(struct smbcli_state * cli, return(-1); } - return(o.ntcreatex.file.fnum); + return(o.ntcreatex.out.file.fnum); } -static struct dd_iohandle * open_smb_handle(const char * host, +static struct dd_iohandle * open_cifs_handle(const char * host, const char * share, const char * path, uint64_t io_size, int options) { - struct smb_handle * smbh; + struct cifs_handle * smbh; if (path == NULL || *path == '\0') { fprintf(stderr, "%s: missing path name within share //%s/%s\n", @@ -309,7 +309,7 @@ static struct dd_iohandle * open_smb_handle(const char * host, DEBUG(4, ("opening SMB stream to //%s/%s for %s\n", host, share, path)); - if ((smbh = talloc_zero(NULL, struct smb_handle)) == NULL) { + if ((smbh = talloc_zero(NULL, struct cifs_handle)) == NULL) { return(NULL); } @@ -349,7 +349,7 @@ struct dd_iohandle * dd_open_path(const char * path, /* Skip over leading directory separators. */ while (*remain == '/' || *remain == '\\') { remain++; } - return(open_smb_handle(host, share, remain, + return(open_cifs_handle(host, share, remain, io_size, options)); } diff --git a/source4/client/client.c b/source4/client/client.c index fa3d3e71f6..a9d7f6cd47 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -1727,7 +1727,7 @@ static int cmd_allinfo(struct smbclient_context *ctx, const char **args) /* first a ALL_INFO QPATHINFO */ finfo.generic.level = RAW_FILEINFO_ALL_INFO; - finfo.generic.file.path = fname; + finfo.generic.in.file.path = fname; status = smb_raw_pathinfo(ctx->cli->tree, ctx, &finfo); if (!NT_STATUS_IS_OK(status)) { d_printf("%s - %s\n", fname, nt_errstr(status)); @@ -1822,7 +1822,7 @@ static int cmd_eainfo(struct smbclient_context *ctx, const char **args) fname = talloc_strdup(ctx, args[1]); finfo.generic.level = RAW_FILEINFO_ALL_EAS; - finfo.generic.file.path = fname; + finfo.generic.in.file.path = fname; status = smb_raw_pathinfo(ctx->cli->tree, ctx, &finfo); if (!NT_STATUS_IS_OK(status)) { @@ -1877,7 +1877,7 @@ static int cmd_acl(struct smbclient_context *ctx, const char **args) } query.query_secdesc.level = RAW_FILEINFO_SEC_DESC; - query.query_secdesc.file.fnum = fnum; + query.query_secdesc.in.file.fnum = fnum; query.query_secdesc.in.secinfo_flags = 0x7; status = smb_raw_fileinfo(ctx->cli->tree, ctx, &query); |