VirtualBox

Changeset 66193 in vbox


Ignore:
Timestamp:
Mar 22, 2017 1:29:33 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114106
Message:

pdmstorageifs.h: Return the region number on success too

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmstorageifs.h

    r66192 r66193  
    493493     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
    494494     * @param   u64LbaStart     Where to store the starting LBA for the region on success.
     495     * @param   puRegion        Where to store the region number on success.
    495496     * @param   pcBlocks        Where to store the number of blocks left in this region starting from the given LBA.
    496497     * @param   pcbBlock        Where to store the size of one block in bytes on success.
     
    498499     */
    499500    DECLR3CALLBACKMEMBER(int, pfnQueryRegionPropertiesForLba,(PPDMIMEDIA pInterface, uint64_t u64LbaStart,
    500                                                               uint64_t *pcBlocks, uint64_t *pcbBlock,
    501                                                               PVDREGIONDATAFORM penmDataForm));
     501                                                              uint32_t *puRegion, uint64_t *pcBlocks,
     502                                                              uint64_t *pcbBlock, PVDREGIONDATAFORM penmDataForm));
    502503
    503504} PDMIMEDIA;
    504505/** PDMIMEDIA interface ID. */
    505 #define PDMIMEDIA_IID                           "c2d1d87a-e1ae-4a70-ac85-f2ffe9c5b736"
     506#define PDMIMEDIA_IID                           "8ec68c48-dd20-4430-8386-f0d628a5aca6"
    506507
    507508
  • trunk/src/VBox/Devices/Storage/DrvHostBase.cpp

    r66192 r66193  
    396396/** @interface_method_impl{PDMIMEDIA,pfnQueryRegionPropertiesForLba} */
    397397static DECLCALLBACK(int) drvHostBaseQueryRegionPropertiesForLba(PPDMIMEDIA pInterface, uint64_t u64LbaStart,
    398                                                                 uint64_t *pcBlocks, uint64_t *pcbBlock,
    399                                                                 PVDREGIONDATAFORM penmDataForm)
     398                                                                uint32_t *puRegion, uint64_t *pcBlocks,
     399                                                                uint64_t *pcbBlock, PVDREGIONDATAFORM penmDataForm)
    400400{
    401401    LogFlowFunc(("\n"));
     
    416416        rc = VERR_NOT_FOUND;
    417417
     418        if (puRegion)
     419            *puRegion = 0;
    418420        if (pcBlocks)
    419421            *pcBlocks = cbMedia / cbBlock;
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r66192 r66193  
    25242524/** @interface_method_impl{PDMIMEDIA,pfnQueryRegionPropertiesForLba} */
    25252525static DECLCALLBACK(int) drvvdQueryRegionPropertiesForLba(PPDMIMEDIA pInterface, uint64_t u64LbaStart,
    2526                                                           uint64_t *pcBlocks, uint64_t *pcbBlock,
    2527                                                           PVDREGIONDATAFORM penmDataForm)
     2526                                                          uint32_t *puRegion, uint64_t *pcBlocks,
     2527                                                          uint64_t *pcbBlock, PVDREGIONDATAFORM penmDataForm)
    25282528{
    25292529    LogFlowFunc(("\n"));
     
    25472547                uint64_t offRegion = u64LbaStart - pRegion->offRegion;
    25482548
     2549                if (puRegion)
     2550                    *puRegion = i;
    25492551                if (pcBlocks)
    25502552                    *pcBlocks = pRegion->cRegionBlocksOrBytes - offRegion;
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