sys: FSP_FSCTL_DEVICE_EXTENSION: add Resource

This commit is contained in:
Bill Zissimopoulos 2015-11-29 14:06:21 -08:00
parent b4f64c3378
commit a082cc1516
4 changed files with 5 additions and 0 deletions

View File

@ -95,6 +95,7 @@ static VOID FspFsctlDeviceDeleteObject(PDEVICE_OBJECT DeviceObject)
{
PAGED_CODE();
ExDeleteResourceLite(&FspFsctlDeviceExtension(DeviceObject)->Resource);
IoDeleteDevice(DeviceObject);
}

View File

@ -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;

View File

@ -249,6 +249,7 @@ typedef struct
typedef struct
{
FSP_DEVICE_EXTENSION Base;
ERESOURCE Resource;
} FSP_FSCTL_DEVICE_EXTENSION;
typedef struct
{

View File

@ -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);