VirtualBox

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


Ignore:
Timestamp:
Oct 17, 2019 7:25:17 AM (5 years ago)
Author:
vboxsync
Message:

Storage/DevVirtioSCSI.cpp: Try to fix burn on Windows build machines

File:
1 edited

Legend:

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

    r81301 r81302  
    999999{
    10001000    RT_NOREF(hIoReq, cbCopy);
     1001
     1002    PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;
     1003
     1004    if (!pReq->cbDataIn)
     1005        return VINF_SUCCESS;
     1006
    10011007    PVIRTIOSCSITARGET pTarget = RT_FROM_MEMBER(pInterface, VIRTIOSCSITARGET, IMediaExPort);
    10021008    PVIRTIOSCSI pThis = pTarget->pVirtioScsi;
    1003     PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;
    10041009
    10051010    AssertReturn(pReq->pDescChain, VERR_INVALID_PARAMETER);
    10061011
    1007     if (!pReq->cbDataIn)
    1008         return VINF_SUCCESS;
    10091012
    10101013    PRTSGBUF pSgPhysReturn = pReq->pDescChain->pSgPhysReturn;
     
    10151018
    10161019    if (!pSgPhysReturn->idxSeg && pSgPhysReturn->cbSegLeft == pSgPhysReturn->paSegs[0].cbSeg)
    1017     {
    1018         Log(("Do advance\n"));
    10191020        RTSgBufAdvance(pSgPhysReturn, pReq->uDataInOff);
    1020     }
    10211021
    10221022    while (cbRemain)
     
    10511051
    10521052    RT_NOREF(hIoReq, cbCopy);
     1053
     1054    PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;
     1055
     1056    if (!pReq->cbDataOut)
     1057        return VINF_SUCCESS;
     1058
    10531059    PVIRTIOSCSITARGET pTarget = RT_FROM_MEMBER(pInterface, VIRTIOSCSITARGET, IMediaExPort);
    10541060    PVIRTIOSCSI pThis = pTarget->pVirtioScsi;
    1055     PVIRTIOSCSIREQ pReq = (PVIRTIOSCSIREQ)pvIoReqAlloc;
    1056 
    1057     if (!pReq->cbDataOut)
    1058         return VINF_SUCCESS;
    10591061
    10601062    PRTSGBUF pSgPhysSend = pReq->pDescChain->pSgPhysSend;
     
    10911093    /* Extract command header and CDB from guest physical memory */
    10921094
    1093     uint16_t cbReqHdr = sizeof(struct REQ_CMD_HDR) + pThis->virtioScsiConfig.uCdbSize;
     1095    size_t cbReqHdr = sizeof(struct REQ_CMD_HDR) + pThis->virtioScsiConfig.uCdbSize;
    10941096    PVIRTIOSCSI_REQ_CMD_T pVirtqReq = (PVIRTIOSCSI_REQ_CMD_T)RTMemAlloc(cbReqHdr);
    10951097    AssertReturn(pVirtqReq, VERR_NO_MEMORY);
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