VirtualBox

Changeset 18436 in vbox for trunk/src/VBox/Devices/Storage


Ignore:
Timestamp:
Mar 28, 2009 2:32:20 AM (16 years ago)
Author:
vboxsync
Message:

DrvHostBase.cpp/h: Grumble. forgot about this bugger.

Location:
trunk/src/VBox/Devices/Storage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DrvHostBase.cpp

    r16334 r18436  
    148148         * Issue a READ(12) request.
    149149         */
    150         const uint32_t LBA = off / pThis->cbBlock;
     150        const uint32_t  LBA      = off / pThis->cbBlock;
    151151        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;
    153154        AssertReturn(!(cbRead % pThis->cbBlock), VERR_INVALID_PARAMETER);
    154         uint8_t abCmd[16] =
     155        uint8_t         abCmd[16] =
    155156        {
    156157            SCSI_READ_12, 0,
     
    159160            0, 0, 0, 0, 0
    160161        };
    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);
    162163
    163164#else
     
    10441045        uint32_t cBlocks;
    10451046        uint32_t cbBlock;
    1046     } Buf = {0, 0};
    1047     size_t cbBuf = sizeof(Buf);
    1048     uint8_t abCmd[16] =
     1047    }           Buf = {0, 0};
     1048    uint32_t    cbBuf = sizeof(Buf);
     1049    uint8_t     abCmd[16] =
    10491050    {
    10501051        SCSI_READ_CAPACITY, 0, 0, 0, 0, 0, 0,
     
    11351136 */
    11361137DECLCALLBACK(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)
    11381139{
    11391140    /*
     
    11461147    AssertPtr(pbCmd);
    11471148    Assert(cbCmd <= 16 && cbCmd >= 1);
    1148     const size_t cbBuf = pcbBuf ? *pcbBuf : 0;
     1149    const uint32_t cbBuf = pcbBuf ? *pcbBuf : 0;
    11491150    if (pcbBuf)
    11501151        *pcbBuf = 0;
     
    11901191        AssertBreak(irc == kIOReturnSuccess);
    11911192        if (pcbBuf)
    1192             *pcbBuf = cbReturned;
     1193            *pcbBuf = (int32_t)cbReturned;
    11931194
    11941195        irc = (*ppScsiTaskI)->GetSCSIServiceResponse(ppScsiTaskI, &ServiceResponse);
  • trunk/src/VBox/Devices/Storage/DrvHostBase.h

    r15831 r18436  
    178178#ifdef RT_OS_DARWIN
    179179DECLCALLBACK(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);
    181181#endif
    182182
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette