Changeset 18436 in vbox for trunk/src/VBox/Devices/Storage
- Timestamp:
- Mar 28, 2009 2:32:20 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r16334 r18436 148 148 * Issue a READ(12) request. 149 149 */ 150 const uint32_t LBA= off / pThis->cbBlock;150 const uint32_t LBA = off / pThis->cbBlock; 151 151 AssertReturn(!(off % pThis->cbBlock), VERR_INVALID_PARAMETER); 152 const uint32_t cBlocks = cbRead / pThis->cbBlock; 152 const uint32_t cbRead32 = (uint32_t)cbRead32; 153 const uint32_t cBlocks = cbRead32 / pThis->cbBlock; 153 154 AssertReturn(!(cbRead % pThis->cbBlock), VERR_INVALID_PARAMETER); 154 uint8_t abCmd[16] =155 uint8_t abCmd[16] = 155 156 { 156 157 SCSI_READ_12, 0, … … 159 160 0, 0, 0, 0, 0 160 161 }; 161 rc = DRVHostBaseScsiCmd(pThis, abCmd, 12, PDMBLOCKTXDIR_FROM_DEVICE, pvBuf, &cbRead , NULL, 0, 0);162 rc = DRVHostBaseScsiCmd(pThis, abCmd, 12, PDMBLOCKTXDIR_FROM_DEVICE, pvBuf, &cbRead32, NULL, 0, 0); 162 163 163 164 #else … … 1044 1045 uint32_t cBlocks; 1045 1046 uint32_t cbBlock; 1046 } Buf = {0, 0};1047 size_tcbBuf = sizeof(Buf);1048 uint8_t abCmd[16] =1047 } Buf = {0, 0}; 1048 uint32_t cbBuf = sizeof(Buf); 1049 uint8_t abCmd[16] = 1049 1050 { 1050 1051 SCSI_READ_CAPACITY, 0, 0, 0, 0, 0, 0, … … 1135 1136 */ 1136 1137 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDMBLOCKTXDIR enmTxDir, 1137 void *pvBuf, size_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies)1138 void *pvBuf, uint32_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies) 1138 1139 { 1139 1140 /* … … 1146 1147 AssertPtr(pbCmd); 1147 1148 Assert(cbCmd <= 16 && cbCmd >= 1); 1148 const size_t cbBuf = pcbBuf ? *pcbBuf : 0;1149 const uint32_t cbBuf = pcbBuf ? *pcbBuf : 0; 1149 1150 if (pcbBuf) 1150 1151 *pcbBuf = 0; … … 1190 1191 AssertBreak(irc == kIOReturnSuccess); 1191 1192 if (pcbBuf) 1192 *pcbBuf = cbReturned;1193 *pcbBuf = (int32_t)cbReturned; 1193 1194 1194 1195 irc = (*ppScsiTaskI)->GetSCSIServiceResponse(ppScsiTaskI, &ServiceResponse); -
trunk/src/VBox/Devices/Storage/DrvHostBase.h
r15831 r18436 178 178 #ifdef RT_OS_DARWIN 179 179 DECLCALLBACK(int) DRVHostBaseScsiCmd(PDRVHOSTBASE pThis, const uint8_t *pbCmd, size_t cbCmd, PDMBLOCKTXDIR enmTxDir, 180 void *pvBuf, size_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies);180 void *pvBuf, uint32_t *pcbBuf, uint8_t *pbSense, size_t cbSense, uint32_t cTimeoutMillies); 181 181 #endif 182 182
Note:
See TracChangeset
for help on using the changeset viewer.