Changeset 34535 in vbox for trunk/src/VBox/Runtime/common/vfs
- Timestamp:
- Nov 30, 2010 5:46:14 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68326
- Location:
- trunk/src/VBox/Runtime/common/vfs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp
r34507 r34535 2401 2401 } 2402 2402 2403 2404 RTDECL(int) RTVfsFileSeek(RTVFSFILE hVfsFile, RTFOFF offSeek, uint32_t uMethod, uint64_t *poffActual) 2405 { 2406 RTVFSFILEINTERNAL *pThis = hVfsFile; 2407 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 2408 AssertReturn(pThis->uMagic == RTVFSFILE_MAGIC, VERR_INVALID_HANDLE); 2409 2410 AssertReturn( uMethod == RTFILE_SEEK_BEGIN 2411 || uMethod == RTFILE_SEEK_CURRENT 2412 || uMethod == RTFILE_SEEK_END, VERR_INVALID_PARAMETER); 2413 AssertPtrNullReturn(poffActual, VERR_INVALID_POINTER); 2414 2415 RTFOFF offActual = 0; 2416 RTVfsLockAcquireWrite(pThis->Stream.Base.hLock); 2417 int rc = pThis->pOps->pfnSeek(pThis->Stream.Base.pvThis, offSeek, uMethod, &offActual); 2418 RTVfsLockReleaseWrite(pThis->Stream.Base.hLock); 2419 if (RT_SUCCESS(rc) && poffActual) 2420 { 2421 Assert(offActual >= 0); 2422 *poffActual = offActual; 2423 } 2424 2425 return rc; 2426 } -
trunk/src/VBox/Runtime/common/vfs/vfsmemory.cpp
r34507 r34535 269 269 } 270 270 else 271 *pcbRead = cbLeftToRead = pSgBuf->paSegs[0].cbSeg; 271 { 272 cbLeftToRead = pSgBuf->paSegs[0].cbSeg; 273 if (pcbRead) 274 *pcbRead = cbLeftToRead; 275 } 272 276 273 277 /* … … 767 771 if (RT_SUCCESS(rc)) 768 772 { 773 pThis->pCurExt = RTListGetFirst(&pThis->ExtentHead, RTVFSMEMEXTENT, Entry); 774 pThis->offCurPos = 0; 775 769 776 if (!(fFlags & RTFILE_O_WRITE)) 770 777 {
Note:
See TracChangeset
for help on using the changeset viewer.