Skip to content

Commit

Permalink
Merge pull request #9 from troyc/OXT-780
Browse files Browse the repository at this point in the history
OXT-780: Generate a container id for each port device.
  • Loading branch information
jean-edouard authored Sep 7, 2017
2 parents efb3e24 + 0ac0aeb commit 2a0630a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Drivers/xenvusb/UsbInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,20 @@ RootHubIfCreateUsbDevice(
PortStatus,
hubContext->PortDevice.DeviceHandleRefCount);

// Give the port device a container Id.
UUID randomUUID;
NTSTATUS stat = ExUuidCreate(&randomUUID);

if (NT_SUCCESS(stat))
{
hubContext->PortDevice.ContainerId = randomUUID;
}
else
{
TraceEvents(TRACE_LEVEL_ERROR, TRACE_DEVICE,
__FUNCTION__": Could not create container Id for device.\n");
}

return STATUS_SUCCESS;
}

Expand Down

0 comments on commit 2a0630a

Please sign in to comment.