From 7d3d7ed6c25a1a25a0a27f753f9476cab0314bc3 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Tue, 1 Dec 2015 09:22:05 -0800 Subject: [PATCH] sys: testing --- src/dll/fsctl.c | 2 ++ src/sys/fsctl.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/dll/fsctl.c b/src/dll/fsctl.c index b0400b72..4056a286 100644 --- a/src/dll/fsctl.c +++ b/src/dll/fsctl.c @@ -145,6 +145,8 @@ FSP_API NTSTATUS FspFsctlOpenVolume(PWSTR VolumePath, GlobalDevicePath(DevicePathBuf, sizeof DevicePathBuf, VolumePath); + DEBUGLOG("Device=\"%S\"", DevicePathBuf); + VolumeHandle = CreateFileW(DevicePathBuf, 0, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0); if (INVALID_HANDLE_VALUE == VolumeHandle) diff --git a/src/sys/fsctl.c b/src/sys/fsctl.c index dfdc3b8f..ed7ddd48 100644 --- a/src/sys/fsctl.c +++ b/src/sys/fsctl.c @@ -159,7 +159,7 @@ static NTSTATUS FspFsctlCreateVolume( RtlCopyMemory(FsvrtDeviceExtension->SecurityDescriptorBuf, SecurityDescriptorBuf, SecurityDescriptorSize); ClearFlag(FsvrtDeviceObject->Flags, DO_DEVICE_INITIALIZING); - Irp->IoStatus.Information = DeviceName.Length + 1; + Irp->IoStatus.Information = DeviceName.Length + sizeof(WCHAR); } /* free the temporary security descriptor */ @@ -246,6 +246,7 @@ static NTSTATUS FspFsvrtDeleteVolume( { PAGED_CODE(); + NTSTATUS Result; FSP_FSVRT_DEVICE_EXTENSION *FsvrtDeviceExtension = FspFsvrtDeviceExtension(DeviceObject); FSP_FSCTL_DEVICE_EXTENSION *FsctlDeviceExtension = FspFsctlDeviceExtension(FsvrtDeviceExtension->FsctlDeviceObject); @@ -253,7 +254,6 @@ static NTSTATUS FspFsvrtDeleteVolume( ExAcquireResourceExclusiveLite(&FsctlDeviceExtension->Base.Resource, TRUE); try { - NTSTATUS Result; PVPB OldVpb; BOOLEAN FreeVpb = FALSE; KIRQL Irql; @@ -305,7 +305,7 @@ static NTSTATUS FspFsvrtDeleteVolume( ExReleaseResourceLite(&FsctlDeviceExtension->Base.Resource); } - return STATUS_SUCCESS; + return Result; } static NTSTATUS FspFsvrtTransact(