diff options
Diffstat (limited to 'source4/libcli')
-rw-r--r-- | source4/libcli/raw/interfaces.h | 7 | ||||
-rw-r--r-- | source4/libcli/raw/rawfile.c | 12 |
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); |