Changeset 43693 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Oct 22, 2012 9:34:18 AM (12 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvSCSI.cpp
r43640 r43693 246 246 } 247 247 248 static DECLCALLBACK(int) drvscsiSetLock(VSCSILUN hVScsiLun, void *pvScsiLunUser, bool fLocked) 249 { 250 PDRVSCSI pThis = (PDRVSCSI)pvScsiLunUser; 251 252 if (fLocked) 253 pThis->pDrvMount->pfnLock(pThis->pDrvMount); 254 else 255 pThis->pDrvMount->pfnUnlock(pThis->pDrvMount); 256 257 return VINF_SUCCESS; 258 } 259 248 260 static int drvscsiTransferCompleteNotify(PPDMIBLOCKASYNCPORT pInterface, void *pvUser, int rc) 249 261 { … … 961 973 pThis->VScsiIoCallbacks.pfnVScsiLunReqTransferEnqueue = drvscsiReqTransferEnqueue; 962 974 pThis->VScsiIoCallbacks.pfnVScsiLunGetFeatureFlags = drvscsiGetFeatureFlags; 975 pThis->VScsiIoCallbacks.pfnVScsiLunMediumSetLock = drvscsiSetLock; 963 976 964 977 rc = VSCSIDeviceCreate(&pThis->hVScsiDevice, drvscsiVScsiReqCompleted, pThis); -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
r43640 r43693 364 364 365 365 /** 366 * Wrapper for the get medium lock/unlock I/O callback. 367 * 368 * @returns VBox status code. 369 * @param pVScsiLun The LUN. 370 * @param bool The new medium lock state. 371 */ 372 DECLINLINE(int) vscsiLunMediumSetLock(PVSCSILUNINT pVScsiLun, bool fLocked) 373 { 374 return pVScsiLun->pVScsiLunIoCallbacks->pfnVScsiLunMediumSetLock(pVScsiLun, 375 pVScsiLun->pvVScsiLunUser, 376 fLocked); 377 } 378 379 /** 366 380 * Wrapper for the I/O request enqueue I/O callback. 367 381 * -
trunk/src/VBox/Devices/Storage/VSCSI/VSCSILunMmc.cpp
r43662 r43693 409 409 { 410 410 pVScsiLunMmc->fLocked = pVScsiReq->pbCDB[4] & 1; 411 vscsiLunMediumSetLock(pVScsiLun, pVScsiLunMmc->fLocked); 411 412 rcReq = vscsiLunReqSenseOkSet(pVScsiLun, pVScsiReq); 412 413 break;
Note:
See TracChangeset
for help on using the changeset viewer.