VirtualBox

Changeset 32299 in vbox for trunk/src/VBox/Main/testcase


Ignore:
Timestamp:
Sep 7, 2010 9:25:05 PM (14 years ago)
Author:
vboxsync
Message:

Main/USBProxyServiceLinux: move the implementation of the device enumeration code out of the class and into static C-like functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstHostHardwareLinux.cpp

    r32262 r32299  
    9191    }
    9292#ifdef VBOX_USB_WITH_SYSFS
    93     VBoxMainUSBDeviceInfo deviceInfo;
    94     VBoxMainUSBDevInfoInit(&deviceInfo);
    95     rc = USBDevInfoUpdateDevices(&deviceInfo);
     93    VECTOR_OBJ(USBDeviceInfo) vecDevInfo;
     94    VEC_INIT_OBJ(&vecDevInfo, USBDeviceInfo, USBDevInfoCleanup);
     95    rc = USBSysfsEnumerateHostDevices(&vecDevInfo);
    9696    if (RT_FAILURE(rc))
    9797    {
     
    102102    RTPrintf ("Listing USB devices detected:\n");
    103103    USBDeviceInfo *pInfo;
    104     VEC_FOR_EACH(&deviceInfo.mvecDevInfo, USBDeviceInfo, pInfo)
     104    VEC_FOR_EACH(&vecDevInfo, USBDeviceInfo, pInfo)
    105105    {
    106106        char szProduct[1024];
     
    146146        }
    147147    }
     148    VEC_CLEANUP_OBJ(&vecDevInfo);
    148149    VBoxMainHotplugWaiter waiter;
    149150    RTPrintf ("Waiting for a hotplug event for five seconds...\n");
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