- Timestamp:
- Oct 15, 2015 10:21:38 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/RAW.cpp
r58132 r58258 639 639 PRAWIMAGE pImage = (PRAWIMAGE)pBackendData; 640 640 641 /* For sequential access do not allow to go back. */ 642 if ( pImage->uOpenFlags & VD_OPEN_FLAGS_SEQUENTIAL 643 && uOffset < pImage->offAccess) 644 { 645 *pcbActuallyRead = 0; 646 return VERR_INVALID_PARAMETER; 647 } 648 641 649 rc = vdIfIoIntFileReadUser(pImage->pIfIo, pImage->pStorage, uOffset, 642 650 pIoCtx, cbRead); 643 651 if (RT_SUCCESS(rc)) 652 { 644 653 *pcbActuallyRead = cbRead; 654 pImage->offAccess = uOffset + cbRead; 655 } 645 656 646 657 return rc; … … 655 666 PRAWIMAGE pImage = (PRAWIMAGE)pBackendData; 656 667 668 /* For sequential access do not allow to go back. */ 669 if ( pImage->uOpenFlags & VD_OPEN_FLAGS_SEQUENTIAL 670 && uOffset < pImage->offAccess) 671 { 672 *pcbWriteProcess = 0; 673 *pcbPostRead = 0; 674 *pcbPreRead = 0; 675 return VERR_INVALID_PARAMETER; 676 } 677 657 678 rc = vdIfIoIntFileWriteUser(pImage->pIfIo, pImage->pStorage, uOffset, 658 679 pIoCtx, cbWrite, NULL, NULL); … … 662 683 *pcbPostRead = 0; 663 684 *pcbPreRead = 0; 685 pImage->offAccess = uOffset + cbWrite; 664 686 } 665 687
Note:
See TracChangeset
for help on using the changeset viewer.