mirror of
				https://github.com/winfsp/winfsp.git
				synced 2025-11-03 12:38:05 -06:00 
			
		
		
		
	sys: FSP_FSCTL_DEVICE_EXTENSION: add Resource
This commit is contained in:
		@@ -95,6 +95,7 @@ static VOID FspFsctlDeviceDeleteObject(PDEVICE_OBJECT DeviceObject)
 | 
			
		||||
{
 | 
			
		||||
    PAGED_CODE();
 | 
			
		||||
 | 
			
		||||
    ExDeleteResourceLite(&FspFsctlDeviceExtension(DeviceObject)->Resource);
 | 
			
		||||
    IoDeleteDevice(DeviceObject);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -41,6 +41,8 @@ NTSTATUS DriverEntry(
 | 
			
		||||
        FSP_RETURN(IoDeleteDevice(FspFsctlDiskDeviceObject));
 | 
			
		||||
    FspDeviceExtension(FspFsctlDiskDeviceObject)->Kind = FspFsctlDeviceExtensionKind;
 | 
			
		||||
    FspDeviceExtension(FspFsctlNetDeviceObject)->Kind = FspFsctlDeviceExtensionKind;
 | 
			
		||||
    ExInitializeResourceLite(&FspFsctlDeviceExtension(FspFsctlDiskDeviceObject)->Resource);
 | 
			
		||||
    ExInitializeResourceLite(&FspFsctlDeviceExtension(FspFsctlNetDeviceObject)->Resource);
 | 
			
		||||
 | 
			
		||||
    /* setup the driver object */
 | 
			
		||||
    DriverObject->DriverUnload = FspUnload;
 | 
			
		||||
 
 | 
			
		||||
@@ -249,6 +249,7 @@ typedef struct
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
    FSP_DEVICE_EXTENSION Base;
 | 
			
		||||
    ERESOURCE Resource;
 | 
			
		||||
} FSP_FSCTL_DEVICE_EXTENSION;
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
@@ -140,6 +140,7 @@ static NTSTATUS FspFsctlMountVolume(
 | 
			
		||||
        &FsvolDeviceObject);
 | 
			
		||||
    if (NT_SUCCESS(Result))
 | 
			
		||||
    {
 | 
			
		||||
#pragma prefast(suppress:28175, "We are a filesystem: ok to access SectorSize")
 | 
			
		||||
        FsvolDeviceObject->SectorSize =
 | 
			
		||||
            FspFsvrtDeviceExtension(FsvrtDeviceObject)->VolumeParams.SectorSize;
 | 
			
		||||
        FsvolDeviceExtension = FspFsvolDeviceExtension(FsvolDeviceObject);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user