VirtualBox

Changeset 30528 in vbox


Ignore:
Timestamp:
Jun 30, 2010 2:16:44 PM (15 years ago)
Author:
vboxsync
Message:

USB: properly name internal USB devices for logging

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/USB/DrvVUSBRootHub.cpp

    r28800 r30528  
    840840        RTMemFree(pUrb);
    841841    }
     842    if (pRh->Hub.pszName)
     843    {
     844        RTStrFree(pRh->Hub.pszName);
     845        pRh->Hub.pszName = NULL;
     846    }
    842847    RTCritSectDelete(&pRh->CritSect);
    843848}
     
    851856static DECLCALLBACK(int) vusbRhConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags)
    852857{
    853     LogFlow(("vusbRhConstruct:\n"));
     858    LogFlow(("vusbRhConstruct: Instance %d\n", pDrvIns->iInstance));
    854859    PVUSBROOTHUB pThis = PDMINS_2_DATA(pDrvIns, PVUSBROOTHUB);
    855860    PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns);
     
    894899    pThis->Hub.cDevices                 = 0;
    895900    pThis->Hub.Dev.pHub                 = &pThis->Hub;
     901    RTStrAPrintf(&pThis->Hub.pszName, "RootHub#%d", pDrvIns->iInstance);
    896902    /* misc */
    897903    pThis->pDrvIns                      = pDrvIns;
  • trunk/src/VBox/VMM/PDMUsb.cpp

    r28800 r30528  
    573573    pUsbIns->iInstance                      = iInstance;
    574574    pUsbIns->pvInstanceDataR3               = &pUsbIns->achInstanceData[0];
     575    pUsbIns->pszName                        = RTStrDup(pUsbDev->pReg->szName);
    575576
    576577    /*
     
    986987    pUsbIns->u32Version = 0;
    987988    pUsbIns->pReg = NULL;
     989    if (pUsbIns->pszName)
     990    {
     991        RTStrFree(pUsbIns->pszName);
     992        pUsbIns->pszName = NULL;
     993    }
    988994    CFGMR3RemoveNode(pUsbIns->Internal.s.pCfgDelete);
    989995    MMR3HeapFree(pUsbIns);
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