VirtualBox

Changeset 48176 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 30, 2013 2:23:46 AM (11 years ago)
Author:
vboxsync
Message:

VDIfVfs.cpp: Try return VINF_EOF in read when we should since vdIfIoFileReadSync probably doesn't do this like the VFS code expects it to.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/VDIfVfs.cpp

    r47716 r48176  
    9090    int rc = vdIfIoFileReadSync(pThis->pVDIfsIo, pThis->pvStorage, off, pSgBuf[0].pvSegCur, pSgBuf->paSegs[0].cbSeg, pcbRead);
    9191    if (RT_SUCCESS(rc))
    92         pThis->offCurPos = off + (pcbRead ? *pcbRead : pSgBuf->paSegs[0].cbSeg);
     92    {
     93        size_t cbAdvance = (pcbRead ? *pcbRead : pSgBuf->paSegs[0].cbSeg);
     94        pThis->offCurPos = off + cbAdvance;
     95        if (pcbRead && !cbAdvance)
     96            rc = VINF_EOF;
     97    }
    9398    return rc;
    9499}
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