UsbDk: CUsbDkControl: Dump all children devices on PING
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
c06e5461f3
commit
1a1edc7f5a
2 changed files with 20 additions and 0 deletions
|
|
@ -57,6 +57,12 @@ void CUsbDkControlDeviceQueue::DeviceControl(WDFQUEUE Queue,
|
|||
{
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_CONTROLDEVICE, "Called IOCTL_USBDK_PING\n");
|
||||
|
||||
//TEMP: Dump children devices
|
||||
{
|
||||
auto devExt = UsbDkControlGetContext(WdfIoQueueGetDevice(Queue));
|
||||
devExt->UsbDkControl->DumpAllChildren();
|
||||
}
|
||||
|
||||
LPTSTR outBuff;
|
||||
size_t outBuffLen;
|
||||
status = WdfRequestRetrieveOutputBuffer(Request, 0, (PVOID *)&outBuff, &outBuffLen);
|
||||
|
|
@ -74,6 +80,14 @@ void CUsbDkControlDeviceQueue::DeviceControl(WDFQUEUE Queue,
|
|||
WdfRequestComplete(Request, status);
|
||||
}
|
||||
|
||||
void CUsbDkControlDevice::DumpAllChildren()
|
||||
{
|
||||
m_FilterDevices.ForEach([](CUsbDkFilterDevice *Filter)
|
||||
{
|
||||
Filter->EnumerateChildren([](CUsbDkChildDevice *Child){ Child->Dump(); });
|
||||
});
|
||||
}
|
||||
|
||||
NTSTATUS CUsbDkControlDevice::Create(WDFDRIVER Driver)
|
||||
{
|
||||
CUsbDkControlDeviceInit DeviceInit;
|
||||
|
|
@ -103,6 +117,9 @@ NTSTATUS CUsbDkControlDevice::Create(WDFDRIVER Driver)
|
|||
status = m_DeviceQueue->Create();
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
auto deviceContext = UsbDkControlGetContext(m_Device);
|
||||
deviceContext->UsbDkControl = this;
|
||||
|
||||
FinishInitializing();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ public:
|
|||
void UnregisterFilter(CUsbDkFilterDevice &FilterDevice)
|
||||
{ m_FilterDevices.Remove(&FilterDevice); }
|
||||
|
||||
//TODO: Temporary, until enumeration implementation
|
||||
void DumpAllChildren();
|
||||
|
||||
static bool Allocate();
|
||||
static void Deallocate()
|
||||
{ delete m_UsbDkControlDevice; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue