Changeset 59049 in vbox
- Timestamp:
- Dec 8, 2015 10:50:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/HBDMgmt-darwin.cpp
r58973 r59049 95 95 /** The status code returned by the callback, after the operation completed. */ 96 96 DAReturn rcDA; 97 /** A detailed error string in case of an error, can be NULL. 98 * Must be freed with RTStrFree(). */ 99 char *pszErrDetail; 97 100 } HBDMGRDACLBKARGS; 98 101 typedef HBDMGRDACLBKARGS *PHBDMGRDACLBKARGS; … … 207 210 { 208 211 PHBDMGRDACLBKARGS pArgs = (PHBDMGRDACLBKARGS)pvContext; 212 pArgs->pszErrDetail = NULL; 213 209 214 if (!hDissenterRef) 210 215 pArgs->rcDA = kDAReturnSuccess; 211 216 else 217 { 218 CFStringRef hStrErr = DADissenterGetStatusString(hDissenterRef); 219 if (hStrErr) 220 { 221 const char *pszErrDetail = CFStringGetCStringPtr(hStrErr, kCFStringEncodingUTF8); 222 if (pszErrDetail) 223 pArgs->pszErrDetail = RTStrDup(pszErrDetail); 224 CFRelease(hStrErr); 225 } 212 226 pArgs->rcDA = DADissenterGetStatus(hDissenterRef); 227 228 } 213 229 RTSemEventSignal(pArgs->pThis->hEvtCallback); 214 230 } … … 453 469 { 454 470 rc = hbdMgrDAReturn2VBoxStatus(CalllbackArgs.rcDA); 455 LogRel(("HBDMgrClaimBlockDevice: DADiskUnmount(\"%s\") failed with %Rrc\n", 456 pszFilename, rc)); 471 LogRel(("HBDMgrClaimBlockDevice: DADiskUnmount(\"%s\") failed with %Rrc (%s)\n", 472 pszFilename, rc, CalllbackArgs.pszErrDetail ? CalllbackArgs.pszErrDetail : "<no detail>")); 473 if (CalllbackArgs.pszErrDetail) 474 RTStrFree(CalllbackArgs.pszErrDetail); 457 475 } 458 476 } … … 460 478 { 461 479 rc = hbdMgrDAReturn2VBoxStatus(CalllbackArgs.rcDA); 462 LogRel(("HBDMgrClaimBlockDevice: DADiskClaim(\"%s\") failed with %Rrc\n", 463 pszFilename, rc)); 480 LogRel(("HBDMgrClaimBlockDevice: DADiskClaim(\"%s\") failed with %Rrc (%s)\n", 481 pszFilename, rc, CalllbackArgs.pszErrDetail ? CalllbackArgs.pszErrDetail : "<no detail>")); 482 if (CalllbackArgs.pszErrDetail) 483 RTStrFree(CalllbackArgs.pszErrDetail); 464 484 } 465 485 if (RT_FAILURE(rc))
Note:
See TracChangeset
for help on using the changeset viewer.