VirtualBox

Ignore:
Timestamp:
Feb 11, 2019 12:19:52 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128763
Message:

Runtime/RTDvm: Add flag to indicate that a volume is contiguous on the underlying medium and add method to query start and end offset of the volume

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/dvm/dvmgpt.cpp

    r76553 r77256  
    493493static DECLCALLBACK(uint64_t) rtDvmFmtGptVolumeGetFlags(RTDVMVOLUMEFMT hVolFmt)
    494494{
    495     NOREF(hVolFmt); /* No supported flags for now. */
    496     return 0;
     495    NOREF(hVolFmt);
     496    return DVMVOLUME_F_CONTIGUOUS;
     497}
     498
     499static DECLCALLBACK(int) rtDvmFmtGptVolumeQueryRange(RTDVMVOLUMEFMT hVolFmt, uint64_t *poffStart, uint64_t *poffEnd)
     500{
     501    PRTDVMVOLUMEFMTINTERNAL pVol = hVolFmt;
     502    *poffStart = pVol->offStart;
     503    *poffEnd   = pVol->offStart + pVol->cbVolume - 1;
     504    return VINF_SUCCESS;
    497505}
    498506
     
    563571    /* pfnVolumeGetFlags */
    564572    rtDvmFmtGptVolumeGetFlags,
     573    /* pfnVolumeQueryRange */
     574    rtDvmFmtGptVolumeQueryRange,
    565575    /* pfnVolumeIsRangeIntersecting */
    566576    rtDvmFmtGptVolumeIsRangeIntersecting,
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