Changeset 63503 in vbox for trunk/src/VBox/Main/src-server/darwin/iokit.cpp
- Timestamp:
- Aug 15, 2016 8:51:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/darwin/iokit.cpp
r62485 r63503 91 91 *********************************************************************************************************************************/ 92 92 /** The IO Master Port. */ 93 static mach_port_t g_MasterPort = NULL;93 static mach_port_t g_MasterPort = MACH_PORT_NULL; 94 94 /** Major darwin version as returned by uname -r. */ 95 95 static uint32_t g_uMajorDarwin = 0; … … 698 698 699 699 IOObjectRelease(pNotify->AttachIterator); 700 pNotify->AttachIterator = NULL;700 pNotify->AttachIterator = IO_OBJECT_NULL; 701 701 IOObjectRelease(pNotify->AttachIterator2); 702 pNotify->AttachIterator2 = NULL;702 pNotify->AttachIterator2 = IO_OBJECT_NULL; 703 703 IOObjectRelease(pNotify->DetachIterator); 704 pNotify->DetachIterator = NULL;704 pNotify->DetachIterator = IO_OBJECT_NULL; 705 705 706 706 CFRunLoopRemoveSource(CFRunLoopGetCurrent(), pNotify->NotifyRLSrc, CFSTR(VBOX_IOKIT_MODE_STRING)); … … 729 729 kern_return_t krc = IORegistryEntryGetChildIterator(Object, kIOServicePlane, &Children); 730 730 if (krc != KERN_SUCCESS) 731 return NULL;731 return IO_OBJECT_NULL; 732 732 io_object_t Child; 733 733 while ((Child = IOIteratorNext(Children)) != IO_OBJECT_NULL) … … 818 818 * Perform the search and get a collection of USB Device back. 819 819 */ 820 io_iterator_t USBDevices = NULL;820 io_iterator_t USBDevices = IO_OBJECT_NULL; 821 821 IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices); 822 822 AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), KERN_FAILURE); … … 1069 1069 * Perform the search and get a collection of USB Device back. 1070 1070 */ 1071 io_iterator_t USBDevices = NULL;1071 io_iterator_t USBDevices = IO_OBJECT_NULL; 1072 1072 IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices); 1073 1073 AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL); … … 1292 1292 1293 1293 CFMutableDictionaryRef RefMatchingDict = IOServiceMatching(kIOUSBDeviceClassName); 1294 AssertReturn(RefMatchingDict, NULL);1294 AssertReturn(RefMatchingDict, VERR_INTERNAL_ERROR_4); 1295 1295 1296 1296 uint64_t u64SessionId = 0; … … 1332 1332 } while (*psz); 1333 1333 1334 io_iterator_t USBDevices = NULL;1334 io_iterator_t USBDevices = IO_OBJECT_NULL; 1335 1335 IOReturn irc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &USBDevices); 1336 AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), NULL);1336 AssertMsgReturn(irc == kIOReturnSuccess, ("irc=%#x\n", irc), VERR_INTERNAL_ERROR_5); 1337 1337 RefMatchingDict = NULL; /* the reference is consumed by IOServiceGetMatchingServices. */ 1338 1338 … … 1364 1364 } 1365 1365 IOObjectRelease(USBDevices); 1366 USBDevices = NULL;1366 USBDevices = IO_OBJECT_NULL; 1367 1367 if (!USBDevice) 1368 1368 { … … 1468 1468 * Perform the search and get a collection of DVD services. 1469 1469 */ 1470 io_iterator_t DVDServices = NULL;1470 io_iterator_t DVDServices = IO_OBJECT_NULL; 1471 1471 IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &DVDServices); 1472 1472 AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL); … … 1600 1600 * Perform the search and get a collection of ethernet controller services. 1601 1601 */ 1602 io_iterator_t EtherIfServices = NULL;1602 io_iterator_t EtherIfServices = IO_OBJECT_NULL; 1603 1603 IOReturn rc = IOServiceGetMatchingServices(g_MasterPort, RefMatchingDict, &EtherIfServices); 1604 1604 AssertMsgReturn(rc == kIOReturnSuccess, ("rc=%d\n", rc), NULL);
Note:
See TracChangeset
for help on using the changeset viewer.