mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 17:03:12 -05:00
sys: FspMountdevMake: use non-repeatable (i.e. non UUIDv5) GUID when non-persistent mountdev
This commit is contained in:
parent
4655926d03
commit
430d7a5650
@ -158,7 +158,9 @@ NTSTATUS FspMountdevMake(
|
|||||||
|
|
||||||
FsvrtDeviceExtension->Persistent = Persistent;
|
FsvrtDeviceExtension->Persistent = Persistent;
|
||||||
|
|
||||||
/* make UUID v5 from the fsvrt device GUID and a unique string derived from the VolumeParams */
|
if (Persistent)
|
||||||
|
{
|
||||||
|
/* make UUID v5 from the fsvrt device GUID and a unique string derived from VolumeParams */
|
||||||
RtlInitEmptyUnicodeString(&String, StringBuf, sizeof StringBuf);
|
RtlInitEmptyUnicodeString(&String, StringBuf, sizeof StringBuf);
|
||||||
Result = RtlUnicodeStringPrintf(&String,
|
Result = RtlUnicodeStringPrintf(&String,
|
||||||
L"%s:%08lx:%08lx",
|
L"%s:%08lx:%08lx",
|
||||||
@ -167,6 +169,10 @@ NTSTATUS FspMountdevMake(
|
|||||||
FsvolDeviceExtension->VolumeParams.VolumeCreationTime);
|
FsvolDeviceExtension->VolumeParams.VolumeCreationTime);
|
||||||
ASSERT(NT_SUCCESS(Result));
|
ASSERT(NT_SUCCESS(Result));
|
||||||
Result = FspUuid5Make(&FspFsvrtDeviceClassGuid, String.Buffer, String.Length, &Guid);
|
Result = FspUuid5Make(&FspFsvrtDeviceClassGuid, String.Buffer, String.Length, &Guid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
/* create volume guid */
|
||||||
|
Result = FspCreateGuid(&Guid);
|
||||||
if (!NT_SUCCESS(Result))
|
if (!NT_SUCCESS(Result))
|
||||||
goto exit;
|
goto exit;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user