VirtualBox

Changeset 8103 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 17, 2008 2:31:11 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
29804
Message:

Determin USBDEVICE::enmSpeed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/darwin/iokit.cpp

    r7745 r8103  
    840840                pCur->pszAddress = RTStrDup(szAddress);
    841841                AssertBreak(pCur->pszAddress,);
     842                uint8_t bSpeed;
     843                AssertBreak(darwinDictGetU8(PropsRef,  CFSTR(kUSBDevicePropertySpeed),  &bSpeed),);
     844                Assert(bSpeed <= 2);
     845                pCur->enmSpeed = bSpeed == 2 ? USBDEVICESPEED_HIGH
     846                               : bSpeed == 1 ? USBDEVICESPEED_FULL
     847                               : bSpeed == 0 ? USBDEVICESPEED_LOW
     848                                             : USBDEVICESPEED_UNKNOWN;
    842849
    843850                /*
     
    845852                 * There are some nameless device in the iMac, apply names to them.
    846853                 */
    847                 /** @todo Device Speed -> enmSpeed; (2 == high speed). */
    848854                darwinDictGetString(PropsRef, CFSTR("USB Vendor Name"),     (char **)&pCur->pszManufacturer);
    849855                if (    !pCur->pszManufacturer
Note: See TracChangeset for help on using the changeset viewer.

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