summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-05-19 15:10:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:09 -0500
commit7f0e17e9030ad734977f66c2cc27faec501154a2 (patch)
treedc44952b04d4e61fb8fcff50b4a3cb720276b57d /source4/libcli/raw
parent472c0886254b82c2feffea734a80c4d29bd773b6 (diff)
downloadsamba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.gz
samba-7f0e17e9030ad734977f66c2cc27faec501154a2.tar.bz2
samba-7f0e17e9030ad734977f66c2cc27faec501154a2.zip
r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze (This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077)
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/interfaces.h7
-rw-r--r--source4/libcli/raw/rawfile.c12
2 files changed, 18 insertions, 1 deletions
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h
index d98b5de370..84f897172e 100644
--- a/source4/libcli/raw/interfaces.h
+++ b/source4/libcli/raw/interfaces.h
@@ -1725,13 +1725,20 @@ union smb_ioctl {
} ntioctl;
};
+enum smb_flush_level {RAW_FLUSH_FLUSH, RAW_FLUSH_ALL};
+
/* struct for SMBflush */
union smb_flush {
struct {
+ enum smb_ioctl_level level;
struct {
union smb_handle file;
} in;
} flush, generic;
+
+ struct {
+ enum smb_ioctl_level level;
+ } flush_all;
};
diff --git a/source4/libcli/raw/rawfile.c b/source4/libcli/raw/rawfile.c
index 2873011aa2..fb3035c0a8 100644
--- a/source4/libcli/raw/rawfile.c
+++ b/source4/libcli/raw/rawfile.c
@@ -849,9 +849,19 @@ NTSTATUS smb_raw_chkpath(struct smbcli_tree *tree, union smb_chkpath *parms)
struct smbcli_request *smb_raw_flush_send(struct smbcli_tree *tree, union smb_flush *parms)
{
struct smbcli_request *req;
+ uint16_t fnum;
+
+ switch (parms->generic.level) {
+ case RAW_FLUSH_FLUSH:
+ fnum = parms->flush.in.file.fnum;
+ break;
+ case RAW_FLUSH_ALL:
+ fnum = 0xFFFF;
+ break;
+ }
SETUP_REQUEST(SMBflush, 1, 0);
- SSVAL(req->out.vwv, VWV(0), parms->flush.in.file.fnum);
+ SSVAL(req->out.vwv, VWV(0), fnum);
if (!smbcli_request_send(req)) {
smbcli_request_destroy(req);