VirtualBox

Changeset 73108 in vbox


Ignore:
Timestamp:
Jul 13, 2018 6:06:12 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
123687
Message:

Corrected definition (type + docs) of RTVFSOBJSETOPS::offObjOps (no longer negative as that caused narrow warnings with gcc).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/vfslowlevel.h

    r69977 r73108  
    316316    /** The structure version (RTVFSOBJSETOPS_VERSION). */
    317317    uint32_t                uVersion;
    318     /** The offset to the RTVFSOBJOPS structure. */
    319     int32_t                 offObjOps;
     318    /** The offset back to the RTVFSOBJOPS structure. */
     319    uint32_t                offObjOps;
    320320
    321321    /**
  • trunk/src/VBox/Runtime/common/vfs/vfsbase.cpp

    r73097 r73108  
    120120        AssertPtrNull((pIoStreamOps)->pfnZeroFill); \
    121121        Assert((pIoStreamOps)->uEndMarker == RTVFSIOSTREAMOPS_VERSION); \
     122    } while (0)
     123
     124/** Asserts that the VFS I/O stream vtable is valid. */
     125#define RTVFSFILE_ASSERT_OPS(pFileOps, a_enmType) \
     126    do { \
     127        RTVFSIOSTREAM_ASSERT_OPS(&(pFileOps)->Stream, a_enmType); \
     128        Assert((pFileOps)->uVersion == RTVFSFILEOPS_VERSION); \
     129        Assert((pFileOps)->fReserved == 0); \
     130        AssertPtr((pFileOps)->pfnSeek); \
     131        AssertPtrNull((pFileOps)->pfnQuerySize); \
     132        AssertPtrNull((pFileOps)->pfnSetSize); \
     133        AssertPtrNull((pFileOps)->pfnQueryMaxSize); \
     134        Assert((pFileOps)->uEndMarker == RTVFSFILEOPS_VERSION); \
    122135    } while (0)
    123136
     
    38483861     * Validate the input, be extra strict in strict builds.
    38493862     */
    3850     AssertPtr(pFileOps);
    3851     AssertReturn(pFileOps->uVersion   == RTVFSFILEOPS_VERSION, VERR_VERSION_MISMATCH);
    3852     AssertReturn(pFileOps->uEndMarker == RTVFSFILEOPS_VERSION, VERR_VERSION_MISMATCH);
    3853     Assert(!pFileOps->fReserved);
    3854     RTVFSIOSTREAM_ASSERT_OPS(&pFileOps->Stream, RTVFSOBJTYPE_FILE);
     3863    RTVFSFILE_ASSERT_OPS(pFileOps, RTVFSOBJTYPE_FILE);
    38553864    Assert(cbInstance > 0);
    38563865    Assert(fOpen & (RTFILE_O_ACCESS_MASK | RTFILE_O_ACCESS_ATTR_MASK));
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