Skip to content

Commit

Permalink
Merge pull request #10 from troyc/OXT-780
Browse files Browse the repository at this point in the history
STABLE-7: OXT-780: Generate a container id for each port device.
  • Loading branch information
jean-edouard authored Sep 8, 2017
2 parents efb3e24 + 0ac0aeb commit 53e4eed
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 53e4eed

Please sign in to comment.