sys,dll: FspFileSystemSetMountPoint: mount manager support

This commit is contained in:
Bill Zissimopoulos
2019-09-05 19:58:14 -07:00
parent a47f853beb
commit 565caebe4c
9 changed files with 280 additions and 11 deletions

View File

@ -29,7 +29,8 @@ BOOLEAN FspMountdevDeviceControl(
PDEVICE_OBJECT FsvrtDeviceObject, PIRP Irp, PIO_STACK_LOCATION IrpSp,
PNTSTATUS PResult);
NTSTATUS FspMountdevMake(
PDEVICE_OBJECT FsvrtDeviceObject, PDEVICE_OBJECT FsvolDeviceObject);
PDEVICE_OBJECT FsvrtDeviceObject, PDEVICE_OBJECT FsvolDeviceObject,
BOOLEAN Persistent);
VOID FspMountdevFini(
PDEVICE_OBJECT FsvrtDeviceObject);
@ -128,7 +129,8 @@ BOOLEAN FspMountdevDeviceControl(
}
NTSTATUS FspMountdevMake(
PDEVICE_OBJECT FsvrtDeviceObject, PDEVICE_OBJECT FsvolDeviceObject)
PDEVICE_OBJECT FsvrtDeviceObject, PDEVICE_OBJECT FsvolDeviceObject,
BOOLEAN Persistent)
{
/*
* This function converts the fsvrt device into a mountdev device that
@ -151,7 +153,10 @@ NTSTATUS FspMountdevMake(
ASSERT(FsvolDeviceExtension->FsvrtDeviceObject == FsvrtDeviceObject);
if (0 != InterlockedCompareExchange(&FsvrtDeviceExtension->IsMountdev, 0, 0))
return STATUS_SUCCESS;
return Persistent == FsvrtDeviceExtension->Persistent ?
STATUS_SUCCESS : STATUS_ACCESS_DENIED;
FsvrtDeviceExtension->Persistent = Persistent;
/* make UUID v5 from the fsvrt device GUID and a unique string derived from the VolumeParams */
RtlInitEmptyUnicodeString(&String, StringBuf, sizeof StringBuf);