mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-15 00:02:46 -05:00
sys: WIP
This commit is contained in:
@ -295,7 +295,7 @@ NTSTATUS FspCreateDeviceObjectList(
|
|||||||
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT **PDeviceObjects, PULONG PDeviceObjectCount);
|
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT **PDeviceObjects, PULONG PDeviceObjectCount);
|
||||||
VOID FspDeleteDeviceObjectList(
|
VOID FspDeleteDeviceObjectList(
|
||||||
PDEVICE_OBJECT *DeviceObjects, ULONG DeviceObjectCount);
|
PDEVICE_OBJECT *DeviceObjects, ULONG DeviceObjectCount);
|
||||||
NTSTATUS FspLookupDeviceObject(
|
NTSTATUS FspHasDeviceObject(
|
||||||
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject);
|
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject);
|
||||||
|
|
||||||
/* debug */
|
/* debug */
|
||||||
|
@ -93,6 +93,7 @@ static NTSTATUS FspFsctlCreateVolume(
|
|||||||
FspIoqInitialize(&FsvrtDeviceExtension->Ioq);
|
FspIoqInitialize(&FsvrtDeviceExtension->Ioq);
|
||||||
RtlCopyMemory(FspFsvrtDeviceExtension(FsvrtDeviceObject)->SecurityDescriptorBuf,
|
RtlCopyMemory(FspFsvrtDeviceExtension(FsvrtDeviceObject)->SecurityDescriptorBuf,
|
||||||
SecurityDescriptorBuf, SecurityDescriptorSize);
|
SecurityDescriptorBuf, SecurityDescriptorSize);
|
||||||
|
ClearFlag(FsvrtDeviceObject->DO_DEVICE_INITIALIZING);
|
||||||
Irp->IoStatus.Information = DeviceName.Length + 1;
|
Irp->IoStatus.Information = DeviceName.Length + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,16 +112,16 @@ static NTSTATUS FspFsctlMountVolume(
|
|||||||
PDEVICE_OBJECT RealDevice = IrpSp->Parameters.MountVolume.Vpb->RealDevice;
|
PDEVICE_OBJECT RealDevice = IrpSp->Parameters.MountVolume.Vpb->RealDevice;
|
||||||
|
|
||||||
/* check the passed in volume object; it must be one of our own */
|
/* 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 (!NT_SUCCESS(Result))
|
||||||
{
|
{
|
||||||
if (STATUS_NO_SUCH_DEVICE == Result)
|
if (STATUS_NO_SUCH_DEVICE == Result)
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_UNRECOGNIZED_VOLUME;
|
||||||
else
|
else
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
if (FILE_DEVICE_VIRTUAL_DISK != RealDevice->DeviceType)
|
if (FILE_DEVICE_VIRTUAL_DISK != RealDevice->DeviceType)
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_UNRECOGNIZED_VOLUME;
|
||||||
|
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ VOID FspDeleteDeviceObjectList(
|
|||||||
ExFreePoolWithTag(DeviceObjects, FSP_TAG);
|
ExFreePoolWithTag(DeviceObjects, FSP_TAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS FspLookupDeviceObject(
|
NTSTATUS FspHasDeviceObject(
|
||||||
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject)
|
PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT DeviceObject)
|
||||||
{
|
{
|
||||||
NTSTATUS Result = STATUS_NO_SUCH_DEVICE;
|
NTSTATUS Result = STATUS_NO_SUCH_DEVICE;
|
||||||
|
Reference in New Issue
Block a user