VirtualBox

Changeset 27922 in vbox


Ignore:
Timestamp:
Mar 31, 2010 7:26:10 PM (14 years ago)
Author:
vboxsync
Message:

DrvVD: Pass request status code to the backends

File:
1 edited

Legend:

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

    r27920 r27922  
    101101    /** Flag whether a synchronous operation is currently pending. */
    102102    volatile bool               fSyncIoPending;
     103    /** Return code of the last completed request. */
     104    int                         rcReqLast;
    103105    /** Callback routine */
    104106    PFNVDCOMPLETED              pfnCompleted;
     
    292294    if (pStorageBackend->fSyncIoPending)
    293295    {
     296        pStorageBackend->rcReqLast      = rcReq;
    294297        pStorageBackend->fSyncIoPending = false;
    295298        RTSemEventSignal(pStorageBackend->EventSem);
     
    338341    {
    339342        pStorageBackend->fSyncIoPending = false;
     343        pStorageBackend->rcReqLast      = VINF_SUCCESS;
    340344        pStorageBackend->pfnCompleted   = pfnCompleted;
    341345        pStorageBackend->pInterfaceThreadSync = NULL;
     
    418422        *pcbRead = cbRead;
    419423
    420     return VINF_SUCCESS;
     424    return pStorageBackend->rcReqLast;
    421425}
    422426
     
    450454        *pcbWritten = cbWrite;
    451455
    452     return VINF_SUCCESS;
     456    return pStorageBackend->rcReqLast;
    453457}
    454458
     
    475479        ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false);
    476480
    477     return VINF_SUCCESS;
     481    return pStorageBackend->rcReqLast;
    478482}
    479483
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