This commit is contained in:
Bill Zissimopoulos
2015-11-29 12:19:09 -08:00
parent 47b1ba13e6
commit 9e0c6461c8
3 changed files with 6 additions and 5 deletions

View File

@ -295,7 +295,7 @@ NTSTATUS FspCreateDeviceObjectList(
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT **PDeviceObjects, PULONG PDeviceObjectCount);
VOID FspDeleteDeviceObjectList(
PDEVICE_OBJECT *DeviceObjects, ULONG DeviceObjectCount);
NTSTATUS FspLookupDeviceObject(
NTSTATUS FspHasDeviceObject(
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject);
/* debug */

View File

@ -93,6 +93,7 @@ static NTSTATUS FspFsctlCreateVolume(
FspIoqInitialize(&FsvrtDeviceExtension->Ioq);
RtlCopyMemory(FspFsvrtDeviceExtension(FsvrtDeviceObject)->SecurityDescriptorBuf,
SecurityDescriptorBuf, SecurityDescriptorSize);
ClearFlag(FsvrtDeviceObject->DO_DEVICE_INITIALIZING);
Irp->IoStatus.Information = DeviceName.Length + 1;
}
@ -111,16 +112,16 @@ static NTSTATUS FspFsctlMountVolume(
PDEVICE_OBJECT RealDevice = IrpSp->Parameters.MountVolume.Vpb->RealDevice;
/* check the passed in volume object; it must be one of our own */
Result = FspLookupDeviceObject(DeviceObject->DriverObject, RealDevice);
Result = FspHasDeviceObject(DeviceObject->DriverObject, RealDevice);
if (!NT_SUCCESS(Result))
{
if (STATUS_NO_SUCH_DEVICE == Result)
return STATUS_INVALID_PARAMETER;
return STATUS_UNRECOGNIZED_VOLUME;
else
return Result;
}
if (FILE_DEVICE_VIRTUAL_DISK != RealDevice->DeviceType)
return STATUS_INVALID_PARAMETER;
return STATUS_UNRECOGNIZED_VOLUME;
return Result;
}

View File

@ -83,7 +83,7 @@ VOID FspDeleteDeviceObjectList(
ExFreePoolWithTag(DeviceObjects, FSP_TAG);
}
NTSTATUS FspLookupDeviceObject(
NTSTATUS FspHasDeviceObject(
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject)
{
NTSTATUS Result = STATUS_NO_SUCH_DEVICE;