VirtualBox

Ignore:
Timestamp:
Dec 7, 2017 1:02:36 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119483
Message:

IPRT/vfs: Implemented RTVFsFileSetSize, RTVfsFileGetMaxSize and RTvfsFileQueryMaxSize.

File:
1 edited

Legend:

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

    r69942 r69977  
    676676    PRTVFSMEMFILE pThis = (PRTVFSMEMFILE)pvThis;
    677677    *pcbFile = pThis->Base.ObjInfo.cbObject;
     678    return VINF_SUCCESS;
     679}
     680
     681
     682/**
     683 * @interface_method_impl{RTVFSFILEOPS,pfnSetSize}
     684 */
     685static DECLCALLBACK(int) rtVfsMemFile_SetSize(void *pvThis, uint64_t cbFile, uint32_t fFlags)
     686{
     687    NOREF(pvThis); NOREF(cbFile); NOREF(fFlags);
     688    AssertMsgFailed(("Lucky you! You get to implement this (or bug bird about it).\n"));
     689    return VERR_NOT_IMPLEMENTED;
     690}
     691
     692
     693/**
     694 * @interface_method_impl{RTVFSFILEOPS,pfnQueryMaxSize}
     695 */
     696static DECLCALLBACK(int) rtVfsMemFile_QueryMaxSize(void *pvThis, uint64_t *pcbMax)
     697{
     698    RT_NOREF(pvThis);
     699    *pcbMax = ~(size_t)0 >> 1;
    678700    return VINF_SUCCESS;
    679701}
     
    717739    rtVfsMemFile_Seek,
    718740    rtVfsMemFile_QuerySize,
     741    rtVfsMemFile_SetSize,
     742    rtVfsMemFile_QueryMaxSize,
    719743    RTVFSFILEOPS_VERSION
    720744};
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