From 7f0e17e9030ad734977f66c2cc27faec501154a2 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 19 May 2006 15:10:39 +0000 Subject: r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level metze (This used to be commit 95bf41b4d4ec96349802955e364fe44ef85f9077) --- source4/libcli/raw/interfaces.h | 7 +++++++ source4/libcli/raw/rawfile.c | 12 +++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) (limited to 'source4/libcli/raw') 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); -- cgit