Changeset 16335 in vbox for trunk/src/VBox/HostDrivers/Support
- Timestamp:
- Jan 28, 2009 8:41:30 PM (16 years ago)
- Location:
- trunk/src/VBox/HostDrivers/Support
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPLibInternal.h
r13865 r16335 195 195 #if defined(RT_OS_DARWIN) 196 196 /** The connection to the VBoxSupDrv service. */ 197 void *pvConnection;197 uintptr_t uConnection; 198 198 #elif defined(RT_OS_LINUX) 199 199 /** Indicates whether madvise(,,MADV_DONTFORK) works. */ -
trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
r15653 r16335 177 177 { 178 178 LogRel(("SUP: IOServiceOpen returned %d. Driver open failed.\n", kr)); 179 pThis-> pvConnection = NULL;179 pThis->uConnection = 0; 180 180 return VERR_VM_DRIVER_OPEN_ERROR; 181 181 } 182 182 183 AssertCompile(sizeof( void *) == sizeof(Connection));184 pThis-> pvConnection = (void *)Connection;183 AssertCompile(sizeof(pThis->uConnection) >= sizeof(Connection)); 184 pThis->uConnection = Connection; 185 185 return VINF_SUCCESS; 186 186 } … … 205 205 if (RT_FAILURE(rc)) 206 206 { 207 kern_return_t kr = IOServiceClose((io_connect_t)pThis-> pvConnection);207 kern_return_t kr = IOServiceClose((io_connect_t)pThis->uConnection); 208 208 if (kr != kIOReturnSuccess) 209 209 { 210 LogRel(("Warning: IOServiceClose(% p) returned %d\n", pThis->pvConnection, kr));210 LogRel(("Warning: IOServiceClose(%RCv) returned %d\n", pThis->uConnection, kr)); 211 211 AssertFailed(); 212 212 } 213 pThis-> pvConnection = NULL;213 pThis->uConnection = 0; 214 214 } 215 215 } … … 227 227 * This will cause the SUPDRVSESSION to be closed (starting IOC 9.1). 228 228 */ 229 if (pThis-> pvConnection)230 { 231 kern_return_t kr = IOServiceClose((io_connect_t)pThis-> pvConnection);229 if (pThis->uConnection) 230 { 231 kern_return_t kr = IOServiceClose((io_connect_t)pThis->uConnection); 232 232 if (kr != kIOReturnSuccess) 233 233 { 234 LogRel(("Warning: IOServiceClose(% p) returned %d\n", pThis->pvConnection, kr));234 LogRel(("Warning: IOServiceClose(%RCv) returned %d\n", pThis->uConnection, kr)); 235 235 AssertFailed(); 236 236 } 237 pThis-> pvConnection = NULL;237 pThis->uConnection = 0; 238 238 } 239 239
Note:
See TracChangeset
for help on using the changeset viewer.