dll: fsctl, fuse: preflight check

This commit is contained in:
Bill Zissimopoulos
2016-06-02 20:21:34 -07:00
parent 7fef1b87f6
commit 9b93c766c3
3 changed files with 103 additions and 10 deletions

View File

@ -193,6 +193,23 @@ exit:
return Result;
}
FSP_API NTSTATUS FspFsctlPreflight(PWSTR DevicePath)
{
NTSTATUS Result;
SIZE_T VolumeListSize;
Result = FspFsctlStartService();
if (!NT_SUCCESS(Result))
return Result;
VolumeListSize = 0;
Result = FspFsctlGetVolumeList(DevicePath, 0, &VolumeListSize);
if (!NT_SUCCESS(Result) && STATUS_BUFFER_TOO_SMALL != Result)
return Result;
return STATUS_SUCCESS;
}
static NTSTATUS FspFsctlStartService(VOID)
{
PWSTR DriverName = L"" FSP_FSCTL_DRIVER_NAME;