- Timestamp:
- Mar 1, 2013 3:45:44 PM (12 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r44888 r44889 258 258 } 259 259 260 static DECLCALLBACK(int) drvscsiEject(VSCSILUN hVScsiLun, void *pvScsiLunUser)261 {262 PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser;263 int rc;264 265 #if 0266 /* This must be done from EMT. */267 PPDMDEVINS pDevIns = NULL; //ATADEVSTATE_2_DEVINS(s);268 269 rc = VMR3ReqPriorityCallWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,270 (PFNRT)pThis->pDrvMount->pfnUnmount, 3,271 pThis->pDrvMount, false /*=fForce*/, true /*=fEject*/);272 Assert(RT_SUCCESS(rc) || (rc == VERR_PDM_MEDIA_LOCKED) || (rc = VERR_PDM_MEDIA_NOT_MOUNTED));273 if (RT_SUCCESS(rc) && pThis->pMediaNotify)274 {275 rc = VMR3ReqCallNoWait(PDMDevHlpGetVM(pDevIns), VMCPUID_ANY,276 (PFNRT)pThis->pMediaNotify->pfnEjected, 2,277 pThis->pMediaNotify, s->iLUN);278 AssertRC(rc);279 }280 #endif281 return VINF_SUCCESS;282 }283 284 260 static int drvscsiTransferCompleteNotify(PPDMIBLOCKASYNCPORT pInterface, void *pvUser, int rc) 285 261 { … … 998 974 pThis->VScsiIoCallbacks.pfnVScsiLunGetFeatureFlags = drvscsiGetFeatureFlags; 999 975 pThis->VScsiIoCallbacks.pfnVScsiLunMediumSetLock = drvscsiSetLock; 1000 pThis->VScsiIoCallbacks.pfnVScsiLunMediumEject = drvscsiEject;1001 976 1002 977 rc = VSCSIDeviceCreate(&pThis->hVScsiDevice, drvscsiVScsiReqCompleted, pThis); -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
r44888 r44889 364 364 365 365 /** 366 * Wrapper for the medium lock/unlock I/O callback.366 * Wrapper for the get medium lock/unlock I/O callback. 367 367 * 368 368 * @returns VBox status code. … … 378 378 379 379 /** 380 * Wrapper for the medium eject I/O callback.381 *382 * @returns VBox status code.383 * @param pVScsiLun The LUN.384 */385 DECLINLINE(int) vscsiLunMediumEject(PVSCSILUNINT pVScsiLun)386 {387 return pVScsiLun->pVScsiLunIoCallbacks->pfnVScsiLunMediumEject(pVScsiLun,388 pVScsiLun->pvVScsiLunUser);389 }390 391 /**392 380 * Wrapper for the I/O request enqueue I/O callback. 393 381 *
Note:
See TracChangeset
for help on using the changeset viewer.