Skip to content

Commit 2a0630a

Browse files
authored
Merge pull request #9 from troyc/OXT-780
OXT-780: Generate a container id for each port device.
2 parents efb3e24 + 0ac0aeb commit 2a0630a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Drivers/xenvusb/UsbInterface.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,20 @@ RootHubIfCreateUsbDevice(
639639
PortStatus,
640640
hubContext->PortDevice.DeviceHandleRefCount);
641641

642+
// Give the port device a container Id.
643+
UUID randomUUID;
644+
NTSTATUS stat = ExUuidCreate(&randomUUID);
645+
646+
if (NT_SUCCESS(stat))
647+
{
648+
hubContext->PortDevice.ContainerId = randomUUID;
649+
}
650+
else
651+
{
652+
TraceEvents(TRACE_LEVEL_ERROR, TRACE_DEVICE,
653+
__FUNCTION__": Could not create container Id for device.\n");
654+
}
655+
642656
return STATUS_SUCCESS;
643657
}
644658

0 commit comments

Comments
 (0)