Changeset 8569 in vbox for trunk/src/VBox/Main/darwin
- Timestamp:
- May 5, 2008 12:32:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/darwin/iokit.cpp
r8538 r8569 821 821 do /* loop for breaking out of on failure. */ 822 822 { 823 AssertBreak (pCur,);823 AssertBreakVoid(pCur); 824 824 825 825 /* … … 829 829 pCur->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE; /* just a default, we'll try harder in a bit. */ 830 830 831 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceClass), &pCur->bDeviceClass),);831 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceClass), &pCur->bDeviceClass)); 832 832 /* skip hubs */ 833 833 if (pCur->bDeviceClass == 0x09 /* hub, find a define! */) 834 834 break; 835 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceSubClass), &pCur->bDeviceSubClass),);836 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceProtocol), &pCur->bDeviceProtocol),);837 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBVendorID), &pCur->idVendor),);838 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBProductID), &pCur->idProduct),);839 AssertBreak (darwinDictGetU16(PropsRef, CFSTR(kUSBDeviceReleaseNumber), &pCur->bcdDevice),);835 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceSubClass), &pCur->bDeviceSubClass)); 836 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDeviceProtocol), &pCur->bDeviceProtocol)); 837 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBVendorID), &pCur->idVendor)); 838 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBProductID), &pCur->idProduct)); 839 AssertBreakVoid(darwinDictGetU16(PropsRef, CFSTR(kUSBDeviceReleaseNumber), &pCur->bcdDevice)); 840 840 uint32_t u32LocationId; 841 AssertBreak (darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId),);841 AssertBreakVoid(darwinDictGetU32(PropsRef, CFSTR(kUSBDevicePropertyLocationID), &u32LocationId)); 842 842 uint64_t u64SessionId; 843 AssertBreak (darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId),);843 AssertBreakVoid(darwinDictGetU64(PropsRef, CFSTR("sessionID"), &u64SessionId)); 844 844 char szAddress[64]; 845 845 RTStrPrintf(szAddress, sizeof(szAddress), "p=0x%04RX16;v=0x%04RX16;s=0x%016RX64;l=0x%08RX32", 846 846 pCur->idProduct, pCur->idVendor, u64SessionId, u32LocationId); 847 847 pCur->pszAddress = RTStrDup(szAddress); 848 AssertBreak (pCur->pszAddress,);848 AssertBreakVoid(pCur->pszAddress); 849 849 pCur->bBus = u32LocationId >> 24; 850 AssertBreak (darwinDictGetU8(PropsRef, CFSTR("PortNum"), &pCur->bPort),);850 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR("PortNum"), &pCur->bPort)); 851 851 uint8_t bSpeed; 852 AssertBreak (darwinDictGetU8(PropsRef, CFSTR(kUSBDevicePropertySpeed), &bSpeed),);852 AssertBreakVoid(darwinDictGetU8(PropsRef, CFSTR(kUSBDevicePropertySpeed), &bSpeed)); 853 853 Assert(bSpeed <= 2); 854 854 pCur->enmSpeed = bSpeed == 2 ? USBDEVICESPEED_HIGH … … 1027 1027 SInt32 i32 = (int16_t)u64Value; 1028 1028 CFNumberRef Num = CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt32Type, &i32); 1029 AssertBreak (Num,);1029 AssertBreakVoid(Num); 1030 1030 CFDictionarySetValue(RefMatchingDict, chValue == 'p' ? CFSTR(kUSBProductID) : CFSTR(kUSBVendorID), Num); 1031 1031 CFRelease(Num);
Note:
See TracChangeset
for help on using the changeset viewer.