VirtualBox

Ignore:
Timestamp:
Aug 1, 2011 2:10:21 PM (13 years ago)
Author:
vboxsync
Message:

usb/win: better logging & cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/win/mon/VBoxUsbFlt.cpp

    r37047 r38262  
    405405        if (!NT_SUCCESS(Status))
    406406        {
    407             LogRel((__FUNCTION__": getting device descriptor failed\n"));
     407            LOGREL((__FUNCTION__": getting device descriptor failed\n"));
    408408            break;
    409409        }
     
    411411        if (vboxUsbFltBlDevMatchLocked(pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice))
    412412        {
    413             LogRel((__FUNCTION__": found a known black list device, vid(0x%x), pid(0x%x), rev(0x%x)\n", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice));
     413            LOGREL((__FUNCTION__": found a known black list device, vid(0x%x), pid(0x%x), rev(0x%x)\n", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice));
    414414#ifdef DEBUG_misha
    415415            AssertFailed();
     
    419419        }
    420420
    421         Log(("Device pid=%x vid=%x rev=%x\n", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice));
     421        LOG(("Device pid=%x vid=%x rev=%x\n", pDevDr->idVendor, pDevDr->idProduct, pDevDr->bcdDevice));
    422422        pDevice->idVendor     = pDevDr->idVendor;
    423423        pDevice->idProduct    = pDevDr->idProduct;
     
    535535            }
    536536#endif
    537             Log((__FUNCTION__": strings: '%s':'%s':'%s' (lang ID %x)\n",
     537            LOG((__FUNCTION__": strings: '%s':'%s':'%s' (lang ID %x)\n",
    538538                        pDevice->szMfgName, pDevice->szProduct, pDevice->szSerial, langId));
    539539        }
     
    713713    Assert(Irql == PASSIVE_LEVEL);
    714714
    715     Log(("==" __FUNCTION__"\n"));
     715    LOG(("==" __FUNCTION__"\n"));
    716716
    717717    for (int i=0;i<RT_ELEMENTS(lpszStandardControllerName);i++)
     
    745745        if (Status == STATUS_SUCCESS)
    746746        {
    747             Log(("IoGetDeviceObjectPointer for %s returned %p %p\n", szHubName, pHubDevObj, pHubFileObj));
     747            LOG(("IoGetDeviceObjectPointer for %s returned %p %p\n", szHubName, pHubDevObj, pHubFileObj));
    748748
    749749            if (pHubDevObj->DriverObject
     
    759759
    760760#ifdef DEBUG
    761                         Log(("Associated driver "));
     761                        LOG(("Associated driver "));
    762762                        vboxUsbDbgPrintUnicodeString(&pHubDevObj->DriverObject->DriverName);
    763                         Log((" -> related dev obj=0x%p\n", IoGetRelatedDeviceObject(pHubFileObj)));
     763                        LOG((" -> related dev obj=0x%p\n", IoGetRelatedDeviceObject(pHubFileObj)));
    764764#endif
    765765
     
    774774                                PDEVICE_OBJECT pDevObj = pDevRelations->Objects[k];
    775775
    776                                 Log(("Found existing USB PDO 0x%p\n", pDevObj));
     776                                LOG(("Found existing USB PDO 0x%p\n", pDevObj));
    777777                                VBOXUSBFLT_LOCK_ACQUIRE();
    778778                                PVBOXUSBFLT_DEVICE pDevice = vboxUsbFltDevGetLocked(pDevObj);
     
    931931{
    932932    *pId = 0;
    933     /* Log the filter details. */
    934     Log((__FUNCTION__": %s %s %s\n",
     933    /* LOG the filter details. */
     934    LOG((__FUNCTION__": %s %s %s\n",
    935935        USBFilterGetString(pFilter, USBFILTERIDX_MANUFACTURER_STR)  ? USBFilterGetString(pFilter, USBFILTERIDX_MANUFACTURER_STR)  : "<null>",
    936936        USBFilterGetString(pFilter, USBFILTERIDX_PRODUCT_STR)       ? USBFilterGetString(pFilter, USBFILTERIDX_PRODUCT_STR)       : "<null>",
    937937        USBFilterGetString(pFilter, USBFILTERIDX_SERIAL_NUMBER_STR) ? USBFilterGetString(pFilter, USBFILTERIDX_SERIAL_NUMBER_STR) : "<null>"));
    938938#ifdef DEBUG
    939     Log(("VBoxUSBClient::addFilter: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n",
     939    LOG(("VBoxUSBClient::addFilter: idVendor=%#x idProduct=%#x bcdDevice=%#x bDeviceClass=%#x bDeviceSubClass=%#x bDeviceProtocol=%#x bBus=%#x bPort=%#x\n",
    940940              USBFilterGetNum(pFilter, USBFILTERIDX_VENDOR_ID),
    941941              USBFilterGetNum(pFilter, USBFILTERIDX_PRODUCT_ID),
     
    13001300    {
    13011301        /* this is due to devie was physically removed */
    1302         Log(("The proxy notified progy stop for the captured device 0x%x\n", pDevice));
     1302        LOG(("The proxy notified progy stop for the captured device 0x%x\n", pDevice));
    13031303        pDevice->enmState = VBOXUSBFLT_DEVSTATE_CAPTURING;
    13041304        vboxUsbFltSignalChangeLocked();
     
    13161316{
    13171317    int rc = VBoxUSBFilterInit();
    1318     AssertRC(rc);
    13191318    if (RT_FAILURE(rc))
     1319    {
     1320        WARN(("VBoxUSBFilterInit failed, rc (%d)", rc));
    13201321        return STATUS_UNSUCCESSFUL;
     1322    }
    13211323
    13221324    memset(&g_VBoxUsbFltGlobals, 0, sizeof (g_VBoxUsbFltGlobals));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette