mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-08 04:52:10 -05:00
sys,dll: ReadDirectory: add Marker, remove Offset
This commit is contained in:
parent
76a2926116
commit
4fe72ab332
@ -647,10 +647,6 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
|||||||
* The file system on which this request is posted.
|
* The file system on which this request is posted.
|
||||||
* @param FileContext
|
* @param FileContext
|
||||||
* The file context of the directory to be read.
|
* The file context of the directory to be read.
|
||||||
* @param Buffer
|
|
||||||
* Pointer to a buffer that will receive the results of the read operation.
|
|
||||||
* @param Length
|
|
||||||
* Length of data to read.
|
|
||||||
* @param Pattern
|
* @param Pattern
|
||||||
* The pattern to match against files in this directory. Can be NULL. The file system
|
* The pattern to match against files in this directory. Can be NULL. The file system
|
||||||
* can choose to ignore this parameter as the FSD will always perform its own pattern
|
* can choose to ignore this parameter as the FSD will always perform its own pattern
|
||||||
@ -659,6 +655,10 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
|||||||
* A file name that marks where in the directory to start reading. Files with names
|
* A file name that marks where in the directory to start reading. Files with names
|
||||||
* that are greater than (not equal to) this marker (in the directory order determined
|
* that are greater than (not equal to) this marker (in the directory order determined
|
||||||
* by the file system) should be returned. Can be NULL.
|
* by the file system) should be returned. Can be NULL.
|
||||||
|
* @param Buffer
|
||||||
|
* Pointer to a buffer that will receive the results of the read operation.
|
||||||
|
* @param Length
|
||||||
|
* Length of data to read.
|
||||||
* @param PBytesTransferred [out]
|
* @param PBytesTransferred [out]
|
||||||
* Pointer to a memory location that will receive the actual number of bytes read.
|
* Pointer to a memory location that will receive the actual number of bytes read.
|
||||||
* @return
|
* @return
|
||||||
@ -668,9 +668,8 @@ typedef struct _FSP_FILE_SYSTEM_INTERFACE
|
|||||||
* FspFileSystemAddDirInfo
|
* FspFileSystemAddDirInfo
|
||||||
*/
|
*/
|
||||||
NTSTATUS (*ReadDirectory)(FSP_FILE_SYSTEM *FileSystem,
|
NTSTATUS (*ReadDirectory)(FSP_FILE_SYSTEM *FileSystem,
|
||||||
PVOID FileContext, PVOID Buffer, ULONG Length,
|
PVOID FileContext, PWSTR Pattern, PWSTR Marker,
|
||||||
PWSTR Pattern, PWSTR Marker,
|
PVOID Buffer, ULONG Length, PULONG PBytesTransferred);
|
||||||
PULONG PBytesTransferred);
|
|
||||||
/**
|
/**
|
||||||
* Resolve reparse points.
|
* Resolve reparse points.
|
||||||
*
|
*
|
||||||
|
@ -1133,12 +1133,12 @@ FSP_API NTSTATUS FspFileSystemOpQueryDirectory(FSP_FILE_SYSTEM *FileSystem,
|
|||||||
BytesTransferred = 0;
|
BytesTransferred = 0;
|
||||||
Result = FileSystem->Interface->ReadDirectory(FileSystem,
|
Result = FileSystem->Interface->ReadDirectory(FileSystem,
|
||||||
(PVOID)ValOfFileContext(Request->Req.QueryDirectory),
|
(PVOID)ValOfFileContext(Request->Req.QueryDirectory),
|
||||||
(PVOID)Request->Req.QueryDirectory.Address,
|
|
||||||
Request->Req.QueryDirectory.Length,
|
|
||||||
0 != Request->Req.QueryDirectory.Pattern.Size ?
|
0 != Request->Req.QueryDirectory.Pattern.Size ?
|
||||||
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Pattern.Offset) : 0,
|
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Pattern.Offset) : 0,
|
||||||
0 != Request->Req.QueryDirectory.Marker.Size ?
|
0 != Request->Req.QueryDirectory.Marker.Size ?
|
||||||
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Marker.Offset) : 0,
|
(PWSTR)(Request->Buffer + Request->Req.QueryDirectory.Marker.Offset) : 0,
|
||||||
|
(PVOID)Request->Req.QueryDirectory.Address,
|
||||||
|
Request->Req.QueryDirectory.Length,
|
||||||
&BytesTransferred);
|
&BytesTransferred);
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
return Result;
|
return Result;
|
||||||
|
@ -1661,9 +1661,8 @@ int fsp_fuse_intf_AddDirInfoOld(fuse_dirh_t dh, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NTSTATUS fsp_fuse_intf_ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
static NTSTATUS fsp_fuse_intf_ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
||||||
PVOID FileContext, PVOID Buffer, ULONG Length,
|
PVOID FileContext, PWSTR Pattern, PWSTR Marker,
|
||||||
PWSTR Pattern, PWSTR Marker,
|
PVOID Buffer, ULONG Length, PULONG PBytesTransferred)
|
||||||
PULONG PBytesTransferred)
|
|
||||||
{
|
{
|
||||||
return STATUS_INVALID_DEVICE_REQUEST;
|
return STATUS_INVALID_DEVICE_REQUEST;
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -1341,9 +1341,8 @@ static BOOLEAN ReadDirectoryEnumFn(MEMFS_FILE_NODE *FileNode, PVOID Context0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
static NTSTATUS ReadDirectory(FSP_FILE_SYSTEM *FileSystem,
|
||||||
PVOID FileNode0, PVOID Buffer, ULONG Length,
|
PVOID FileNode0, PWSTR Pattern, PWSTR Marker,
|
||||||
PWSTR Pattern, PWSTR Marker,
|
PVOID Buffer, ULONG Length, PULONG PBytesTransferred)
|
||||||
PULONG PBytesTransferred)
|
|
||||||
{
|
{
|
||||||
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
MEMFS *Memfs = (MEMFS *)FileSystem->UserContext;
|
||||||
MEMFS_FILE_NODE *FileNode = (MEMFS_FILE_NODE *)FileNode0;
|
MEMFS_FILE_NODE *FileNode = (MEMFS_FILE_NODE *)FileNode0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user