VirtualBox

Ignore:
Timestamp:
Nov 27, 2017 3:44:03 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119285
Message:

IPRT: VFS IsRangeInUse cleanup.

  • Renamed to RTVfsQueryRangeState / pfnQueryRangeState because it isn't a predicate returning a bool, but an IPRT status.
  • Changed the pfnIsRangeInUse offset parameter to uint64_t from RTFOFF since we don't want to deal with negative offset and the RTVfsIsRangeInUse API takes an unsigned value.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp

    r69830 r69844  
    21152115    *phDir = NIL_RTVFSDIR;
    21162116
    2117     if (!pThis->pOps->pfnIsRangeInUse)
     2117    if (!pThis->pOps->pfnOpenRoot)
    21182118        return VERR_NOT_SUPPORTED;
    21192119    RTVfsLockAcquireRead(pThis->Base.hLock);
     
    22242224
    22252225
    2226 RTDECL(int) RTVfsIsRangeInUse(RTVFS hVfs, uint64_t off, size_t cb, bool *pfUsed)
     2226RTDECL(int) RTVfsQueryRangeState(RTVFS hVfs, uint64_t off, size_t cb, bool *pfUsed)
    22272227{
    22282228    RTVFSINTERNAL *pThis = hVfs;
     
    22302230    AssertReturn(pThis->uMagic == RTVFS_MAGIC, VERR_INVALID_HANDLE);
    22312231
    2232     if (!pThis->pOps->pfnIsRangeInUse)
     2232    if (!pThis->pOps->pfnQueryRangeState)
    22332233        return VERR_NOT_SUPPORTED;
    22342234    RTVfsLockAcquireRead(pThis->Base.hLock);
    2235     int rc = pThis->pOps->pfnIsRangeInUse(pThis->Base.pvThis, off, cb, pfUsed);
     2235    int rc = pThis->pOps->pfnQueryRangeState(pThis->Base.pvThis, off, cb, pfUsed);
    22362236    RTVfsLockReleaseRead(pThis->Base.hLock);
    22372237
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette