VirtualBox

Changeset 139 in vbox


Ignore:
Timestamp:
Jan 18, 2007 2:59:33 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
17590
Message:

code cleanup, some more tests in vdiDumpImage()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VBoxHDD.cpp

    r124 r139  
    213213*   Internal Functions for header access                                       *
    214214*******************************************************************************/
    215 static VDIIMAGETYPE getImageType(PVDIHEADER ph)
     215static inline VDIIMAGETYPE getImageType(PVDIHEADER ph)
    216216{
    217217    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    224224}
    225225
    226 static unsigned getImageFlags(PVDIHEADER ph)
     226static inline unsigned getImageFlags(PVDIHEADER ph)
    227227{
    228228    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    235235}
    236236
    237 static char *getImageComment(PVDIHEADER ph)
     237static inline char *getImageComment(PVDIHEADER ph)
    238238{
    239239    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    246246}
    247247
    248 static unsigned getImageBlocksOffset(PVDIHEADER ph)
     248static inline unsigned getImageBlocksOffset(PVDIHEADER ph)
    249249{
    250250    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    257257}
    258258
    259 static unsigned getImageDataOffset(PVDIHEADER ph)
     259static inline unsigned getImageDataOffset(PVDIHEADER ph)
    260260{
    261261    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    269269}
    270270
    271 static PVDIDISKGEOMETRY getImageGeometry(PVDIHEADER ph)
     271static inline PVDIDISKGEOMETRY getImageGeometry(PVDIHEADER ph)
    272272{
    273273    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    280280}
    281281
    282 static PDMBIOSTRANSLATION getImageTranslation(PVDIHEADER ph)
     282static inline PDMBIOSTRANSLATION getImageTranslation(PVDIHEADER ph)
    283283{
    284284    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    291291}
    292292
    293 static void setImageTranslation(PVDIHEADER ph, PDMBIOSTRANSLATION enmTranslation)
     293static inline void setImageTranslation(PVDIHEADER ph, PDMBIOSTRANSLATION enmTranslation)
    294294{
    295295    switch (GET_MAJOR_HEADER_VERSION(ph))
    296296    {
    297         case 0:
    298             return;
    299         case 1:
    300             ph->u.v1.u32Translation = (uint32_t)enmTranslation;
    301             return;
     297        case 0:                                                     return;
     298        case 1: ph->u.v1.u32Translation = (uint32_t)enmTranslation; return;
    302299    }
    303300    AssertFailed();
    304301}
    305302
    306 static uint64_t getImageDiskSize(PVDIHEADER ph)
     303static inline uint64_t getImageDiskSize(PVDIHEADER ph)
    307304{
    308305    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    315312}
    316313
    317 static unsigned getImageBlockSize(PVDIHEADER ph)
     314static inline unsigned getImageBlockSize(PVDIHEADER ph)
    318315{
    319316    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    326323}
    327324
    328 static unsigned getImageExtraBlockSize(PVDIHEADER ph)
     325static inline unsigned getImageExtraBlockSize(PVDIHEADER ph)
    329326{
    330327    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    337334}
    338335
    339 static unsigned getImageBlocks(PVDIHEADER ph)
     336static inline unsigned getImageBlocks(PVDIHEADER ph)
    340337{
    341338    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    348345}
    349346
    350 static unsigned getImageBlocksAllocated(PVDIHEADER ph)
     347static inline unsigned getImageBlocksAllocated(PVDIHEADER ph)
    351348{
    352349    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    359356}
    360357
    361 static void setImageBlocksAllocated(PVDIHEADER ph, unsigned cBlocks)
     358static inline void setImageBlocksAllocated(PVDIHEADER ph, unsigned cBlocks)
    362359{
    363360    switch (GET_MAJOR_HEADER_VERSION(ph))
    364361    {
    365         case 0:
    366             ph->u.v0.cBlocksAllocated = cBlocks;
    367             return;
    368         case 1:
    369             ph->u.v1.cBlocksAllocated = cBlocks;
    370             return;
     362        case 0: ph->u.v0.cBlocksAllocated = cBlocks; return;
     363        case 1: ph->u.v1.cBlocksAllocated = cBlocks; return;
    371364    }
    372365    AssertFailed();
    373366}
    374367
    375 static PRTUUID getImageCreationUUID(PVDIHEADER ph)
     368static inline PRTUUID getImageCreationUUID(PVDIHEADER ph)
    376369{
    377370    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    384377}
    385378
    386 static PRTUUID getImageModificationUUID(PVDIHEADER ph)
     379static inline PRTUUID getImageModificationUUID(PVDIHEADER ph)
    387380{
    388381    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    395388}
    396389
    397 static PRTUUID getImageParentUUID(PVDIHEADER ph)
     390static inline PRTUUID getImageParentUUID(PVDIHEADER ph)
    398391{
    399392    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    406399}
    407400
    408 static PRTUUID getImageParentModificationUUID(PVDIHEADER ph)
     401static inline PRTUUID getImageParentModificationUUID(PVDIHEADER ph)
    409402{
    410403    switch (GET_MAJOR_HEADER_VERSION(ph))
     
    421414 * Note: for speed reasons block size should be a power of 2 !
    422415 */
    423 #define VDI_IMAGE_DEFAULT_BLOCK_SIZE   (1 * 1024 * 1024)
     416#define VDI_IMAGE_DEFAULT_BLOCK_SIZE            _1M
    424417
    425418/**
    426419 * fModified bit flags.
    427420 */
    428 #define VDI_IMAGE_MODIFIED_FLAG                 (0x01)
    429 #define VDI_IMAGE_MODIFIED_FIRST                (0x02)
    430 #define VDI_IMAGE_MODIFIED_DISABLE_UUID_UPDATE  (0x04)
     421#define VDI_IMAGE_MODIFIED_FLAG                 BIT(0)
     422#define VDI_IMAGE_MODIFIED_FIRST                BIT(1)
     423#define VDI_IMAGE_MODIFIED_DISABLE_UUID_UPDATE  BIT(2)
    431424
    432425/**
     
    533526static unsigned getPowerOfTwo(unsigned uNumber);
    534527static void vdiInitPreHeader(PVDIPREHEADER pPreHdr);
    535 static int vdiValidatePreHeader(PVDIPREHEADER pPreHdr);
    536 static void vdiInitHeader(PVDIHEADER pHeader,
    537                           VDIIMAGETYPE enmType,
    538                           uint32_t fFlags,
    539                           const char *pszComment,
    540                           uint64_t cbDisk,
    541                           uint32_t cbBlock,
     528static int  vdiValidatePreHeader(PVDIPREHEADER pPreHdr);
     529static void vdiInitHeader(PVDIHEADER pHeader, VDIIMAGETYPE enmType, uint32_t fFlags,
     530                          const char *pszComment, uint64_t cbDisk, uint32_t cbBlock,
    542531                          uint32_t cbBlockExtra);
    543 static int vdiValidateHeader(PVDIHEADER pHeader);
    544 static int vdiCreateImage(const char *pszFilename,
    545                           VDIIMAGETYPE enmType,
    546                           unsigned fFlags,
    547                           uint64_t cbSize,
    548                           const char *pszComment,
    549                           PVDIIMAGEDESC pParent,
     532static int  vdiValidateHeader(PVDIHEADER pHeader);
     533static int  vdiCreateImage(const char *pszFilename, VDIIMAGETYPE enmType, unsigned fFlags,
     534                          uint64_t cbSize, const char *pszComment, PVDIIMAGEDESC pParent,
    550535                          PFNVMPROGRESS pfnProgress, void *pvUser);
    551536static void vdiInitImageDesc(PVDIIMAGEDESC pImage);
    552537static void vdiSetupImageDesc(PVDIIMAGEDESC pImage);
    553 static int vdiOpenImage(PVDIIMAGEDESC *ppImage,
    554                         const char *pszFilename,
    555                         unsigned fOpen,
     538static int  vdiOpenImage(PVDIIMAGEDESC *ppImage, const char *pszFilename, unsigned fOpen,
    556539                        PVDIIMAGEDESC pParent);
    557 static int vdiUpdateHeader(PVDIIMAGEDESC pImage);
    558 static int vdiUpdateBlockInfo(PVDIIMAGEDESC pImage, unsigned uBlock);
    559 static int vdiUpdateBlocks(PVDIIMAGEDESC pImage);
     540static int  vdiUpdateHeader(PVDIIMAGEDESC pImage);
     541static int  vdiUpdateBlockInfo(PVDIIMAGEDESC pImage, unsigned uBlock);
     542static int  vdiUpdateBlocks(PVDIIMAGEDESC pImage);
    560543static void vdiSetModifiedFlag(PVDIIMAGEDESC pImage);
    561544static void vdiResetModifiedFlag(PVDIIMAGEDESC pImage);
     
    566549static void vdiFlushImage(PVDIIMAGEDESC pImage);
    567550static void vdiCloseImage(PVDIIMAGEDESC pImage);
    568 static int vdiReadInBlock(PVDIIMAGEDESC pImage, unsigned uBlock, unsigned offRead, unsigned cbToRead, void *pvBuf);
    569 static int vdiFillBlockByZeroes(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock);
    570 static int vdiWriteInBlock(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock, unsigned offWrite, unsigned cbToWrite, const void *pvBuf);
    571 static int vdiCopyBlock(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock);
    572 static int vdiMergeImages(PVDIIMAGEDESC pImageFrom, PVDIIMAGEDESC pImageTo, bool fParentToChild,
     551static int  vdiReadInBlock(PVDIIMAGEDESC pImage, unsigned uBlock, unsigned offRead,
     552                           unsigned cbToRead, void *pvBuf);
     553static int  vdiFillBlockByZeroes(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock);
     554static int  vdiWriteInBlock(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock,
     555                            unsigned offWrite, unsigned cbToWrite, const void *pvBuf);
     556static int  vdiCopyBlock(PVDIDISK pDisk, PVDIIMAGEDESC pImage, unsigned uBlock);
     557static int  vdiMergeImages(PVDIIMAGEDESC pImageFrom, PVDIIMAGEDESC pImageTo, bool fParentToChild,
    573558                          PFNVMPROGRESS pfnProgress, void *pvUser);
    574 static int vdiCommitToImage(PVDIDISK pDisk, PVDIIMAGEDESC pDstImage,
    575                             PFNVMPROGRESS pfnProgress, void *pvUser);
    576559static void vdiInitVDIDisk(PVDIDISK pDisk);
    577560static void vdiAddImageToList(PVDIDISK pDisk, PVDIIMAGEDESC pImage);
    578561static void vdiRemoveImageFromList(PVDIDISK pDisk, PVDIIMAGEDESC pImage);
    579562static PVDIIMAGEDESC vdiGetImageByNumber(PVDIDISK pDisk, int nImage);
    580 static int vdiChangeImageMode(PVDIIMAGEDESC pImage, bool fReadOnly);
    581 static int vdiUpdateReadOnlyHeader(PVDIIMAGEDESC pImage);
     563static int  vdiChangeImageMode(PVDIIMAGEDESC pImage, bool fReadOnly);
     564static int  vdiUpdateReadOnlyHeader(PVDIIMAGEDESC pImage);
     565
     566static int  vdiCommitToImage(PVDIDISK pDisk, PVDIIMAGEDESC pDstImage,
     567                            PFNVMPROGRESS pfnProgress, void *pvUser);
    582568static void vdiDumpImage(PVDIIMAGEDESC pImage);
    583569
    584 static DECLCALLBACK(int) vdiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle);
     570static DECLCALLBACK(int)  vdiConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle);
    585571static DECLCALLBACK(void) vdiDestruct(PPDMDRVINS pDrvIns);
    586 static DECLCALLBACK(int) vdiRead(PPDMIMEDIA pInterface, uint64_t off, void *pvBuf, size_t cbRead);
    587 static DECLCALLBACK(int) vdiWrite(PPDMIMEDIA pInterface, uint64_t off, const void *pvBuf, size_t cbWrite);
    588 static DECLCALLBACK(int) vdiFlush(PPDMIMEDIA pInterface);
     572static DECLCALLBACK(int)  vdiRead(PPDMIMEDIA pInterface,
     573                                  uint64_t off, void *pvBuf, size_t cbRead);
     574static DECLCALLBACK(int)  vdiWrite(PPDMIMEDIA pInterface,
     575                                   uint64_t off, const void *pvBuf, size_t cbWrite);
     576static DECLCALLBACK(int)  vdiFlush(PPDMIMEDIA pInterface);
    589577static DECLCALLBACK(uint64_t) vdiGetSize(PPDMIMEDIA pInterface);
    590 static DECLCALLBACK(int) vdiBiosGetGeometry(PPDMIMEDIA pInterface, uint32_t *pcCylinders, uint32_t *pcHeads, uint32_t *pcSectors);
    591 static DECLCALLBACK(int) vdiBiosSetGeometry(PPDMIMEDIA pInterface, uint32_t cCylinders, uint32_t cHeads, uint32_t cSectors);
    592 static DECLCALLBACK(int) vdiGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid);
     578static DECLCALLBACK(int)  vdiBiosGetGeometry(PPDMIMEDIA pInterface, uint32_t *pcCylinders,
     579                                             uint32_t *pcHeads, uint32_t *pcSectors);
     580static DECLCALLBACK(int)  vdiBiosSetGeometry(PPDMIMEDIA pInterface, uint32_t cCylinders,
     581                                             uint32_t cHeads, uint32_t cSectors);
     582static DECLCALLBACK(int)  vdiGetUuid(PPDMIMEDIA pInterface, PRTUUID pUuid);
    593583static DECLCALLBACK(bool) vdiIsReadOnly(PPDMIMEDIA pInterface);
    594 static DECLCALLBACK(int) vdiBiosGetTranslation(PPDMIMEDIA pInterface, PPDMBIOSTRANSLATION penmTranslation);
    595 static DECLCALLBACK(int) vdiBiosSetTranslation(PPDMIMEDIA pInterface, PDMBIOSTRANSLATION enmTranslation);
     584static DECLCALLBACK(int)  vdiBiosGetTranslation(PPDMIMEDIA pInterface,
     585                                                PPDMBIOSTRANSLATION penmTranslation);
     586static DECLCALLBACK(int)  vdiBiosSetTranslation(PPDMIMEDIA pInterface,
     587                                                PDMBIOSTRANSLATION enmTranslation);
    596588static DECLCALLBACK(void *) vdiQueryInterface(PPDMIBASE pInterface, PDMINTERFACE enmInterface);
    597589
     
    643635 * @param   pHeader     Assumes it was initially initialized to all zeros.
    644636 */
    645 static void vdiInitHeader(PVDIHEADER pHeader,
    646                           VDIIMAGETYPE enmType,
    647                           uint32_t fFlags,
    648                           const char *pszComment,
    649                           uint64_t cbDisk,
    650                           uint32_t cbBlock,
     637static void vdiInitHeader(PVDIHEADER pHeader, VDIIMAGETYPE enmType, uint32_t fFlags,
     638                          const char *pszComment, uint64_t cbDisk, uint32_t cbBlock,
    651639                          uint32_t cbBlockExtra)
    652640{
     
    755743    /* Check common header parameters. */
    756744
     745    bool failure = false;
     746
    757747    if (    getImageType(pHeader) < VDI_IMAGE_TYPE_FIRST
    758748        ||  getImageType(pHeader) > VDI_IMAGE_TYPE_LAST)
    759         return VERR_VDI_INVALID_TYPE;
     749    {
     750        LogRel(("VDI: bad image type %d\n", getImageType(pHeader)));
     751        failure = true;
     752    }
    760753
    761754    if (getImageFlags(pHeader) & ~VDI_IMAGE_FLAGS_MASK)
    762         return VERR_VDI_INVALID_FLAGS;
     755    {
     756        LogRel(("VDI: bad image flags %08x\n", getImageFlags(pHeader)));
     757        failure = true;
     758    }
    763759
    764760    if ((getImageGeometry(pHeader))->cbSector != VDI_GEOMETRY_SECTOR_SIZE)
    765761    {
    766         LogRel(("VDI: wrong section size (%d != %d)\n",
     762        LogRel(("VDI: wrong sector size (%d != %d)\n",
    767763               (getImageGeometry(pHeader))->cbSector, VDI_GEOMETRY_SECTOR_SIZE));
    768         return VERR_VDI_INVALID_HEADER;
     764        failure = true;
    769765    }
    770766
     
    777773              getImageDiskSize(pHeader), getImageBlockSize(pHeader),
    778774              getImageBlocks(pHeader), getPowerOfTwo(getImageBlockSize(pHeader))));
    779         return VERR_VDI_INVALID_HEADER;
     775        failure = true;
    780776    }
    781777
     
    786782              getImageBlocksAllocated(pHeader), getImageBlocks(pHeader),
    787783              getImageBlockSize(pHeader), getImageDiskSize(pHeader)));
    788         return VERR_VDI_INVALID_HEADER;
     784        failure = true;
    789785    }
    790786
     
    794790        LogRel(("VDI: wrong extra size (%d, %d)\n",
    795791               getImageExtraBlockSize(pHeader), getPowerOfTwo(getImageExtraBlockSize(pHeader))));
    796         return VERR_VDI_INVALID_HEADER;
    797     }
    798 
    799     if ( (uint64_t)getImageBlockSize(pHeader) * getImageBlocks(pHeader) < getImageDiskSize(pHeader))
     792        failure = true;
     793    }
     794
     795    if ((uint64_t)getImageBlockSize(pHeader) * getImageBlocks(pHeader) < getImageDiskSize(pHeader))
    800796    {
    801797        LogRel(("VDI: wrong disk size (%d, %d, %lld)\n",
    802                getImageBlockSize(pHeader),
    803                getImageBlocks(pHeader),
    804                getImageDiskSize(pHeader)));
    805         return VERR_VDI_INVALID_HEADER;
     798               getImageBlockSize(pHeader), getImageBlocks(pHeader), getImageDiskSize(pHeader)));
     799        failure = true;
    806800    }
    807801
     
    809803    {
    810804        LogRel(("VDI: uuid of creator is 0\n"));
    811         return VERR_VDI_INVALID_HEADER;
    812     }
     805        failure = true;
     806    }
     807
    813808    if (RTUuidIsNull(getImageModificationUUID(pHeader)))
    814809    {
    815810        LogRel(("VDI: uuid of modificator is 0\n"));
    816         return VERR_VDI_INVALID_HEADER;
    817     }
    818 
    819     return VINF_SUCCESS;
     811        failure = true;
     812    }
     813
     814    return failure ? VERR_VDI_INVALID_HEADER : VINF_SUCCESS;
    820815}
    821816
     
    836831static void vdiSetupImageDesc(PVDIIMAGEDESC pImage)
    837832{
    838     pImage->fFlags = getImageFlags(&pImage->Header);
    839     pImage->offStartBlocks = getImageBlocksOffset(&pImage->Header);
    840     pImage->offStartData = getImageDataOffset(&pImage->Header);
    841     pImage->uBlockMask = getImageBlockSize(&pImage->Header) - 1;
    842     pImage->uShiftIndex2Offset = pImage->uShiftOffset2Index = getPowerOfTwo(getImageBlockSize(&pImage->Header));
    843     pImage->offStartBlockData = getImageExtraBlockSize(&pImage->Header);
     833    pImage->fFlags             = getImageFlags(&pImage->Header);
     834    pImage->offStartBlocks     = getImageBlocksOffset(&pImage->Header);
     835    pImage->offStartData       = getImageDataOffset(&pImage->Header);
     836    pImage->uBlockMask         = getImageBlockSize(&pImage->Header) - 1;
     837    pImage->uShiftIndex2Offset =
     838    pImage->uShiftOffset2Index = getPowerOfTwo(getImageBlockSize(&pImage->Header));
     839    pImage->offStartBlockData  = getImageExtraBlockSize(&pImage->Header);
    844840    if (pImage->offStartBlockData != 0)
    845841        pImage->uShiftIndex2Offset += getPowerOfTwo(pImage->offStartBlockData);
     
    849845 * internal: create image.
    850846 */
    851 static int vdiCreateImage(const char *pszFilename,
    852                           VDIIMAGETYPE enmType,
    853                           unsigned fFlags,
    854                           uint64_t cbSize,
    855                           const char *pszComment,
    856                           PVDIIMAGEDESC pParent,
     847static int vdiCreateImage(const char *pszFilename, VDIIMAGETYPE enmType, unsigned fFlags,
     848                          uint64_t cbSize, const char *pszComment, PVDIIMAGEDESC pParent,
    857849                          PFNVMPROGRESS pfnProgress, void *pvUser)
    858850{
     
    10151007                    if (pfnProgress)
    10161008                    {
    1017                         rc = pfnProgress(NULL /* Achtung! pVM=NULL  */,
     1009                        rc = pfnProgress(NULL /* WARNING! pVM=NULL  */,
    10181010                                         (unsigned)(((cbDisk - cbFill) * 100) / cbDisk),
    10191011                                         pvUser);
     
    10481040    if (    VBOX_SUCCESS(rc)
    10491041        &&  pfnProgress)
    1050         pfnProgress(NULL /* Achtung! pVM=NULL  */, 100, pvUser);
     1042        pfnProgress(NULL /* WARNING! pVM=NULL  */, 100, pvUser);
    10511043
    10521044    Log(("vdiCreateImage: done, filename=\"%s\", rc=%Vrc\n", pszFilename, rc));
     
    10591051 * @internal
    10601052 */
    1061 static int vdiOpenImage(PVDIIMAGEDESC *ppImage,
    1062                         const char *pszFilename,
    1063                         unsigned fOpen,
    1064                         PVDIIMAGEDESC pParent)
     1053static int vdiOpenImage(PVDIIMAGEDESC *ppImage, const char *pszFilename,
     1054                        unsigned fOpen, PVDIIMAGEDESC pParent)
    10651055{
    10661056    /*
     
    11511141    if (VBOX_FAILURE(rc))
    11521142        goto l_open_failed;
     1143
    11531144    rc = vdiValidateHeader(&pImage->Header);
    11541145    if (VBOX_FAILURE(rc))
     
    11811172
    11821173        /* Check linkage data. */
    1183         if (    RTUuidCompare(getImageParentUUID(&pImage->Header), getImageCreationUUID(&pParent->Header))
    1184             ||  RTUuidCompare(getImageParentModificationUUID(&pImage->Header), getImageModificationUUID(&pParent->Header)))
     1174        if (    RTUuidCompare(getImageParentUUID(&pImage->Header),
     1175                              getImageCreationUUID(&pParent->Header))
     1176            ||  RTUuidCompare(getImageParentModificationUUID(&pImage->Header),
     1177                              getImageModificationUUID(&pParent->Header)))
    11851178        {
    11861179            rc = VERR_VDI_IMAGES_UUID_MISMATCH;
     
    12331226    if (VBOX_FAILURE(rc))
    12341227        goto l_open_failed;
    1235     rc = RTFileRead(pImage->File,
    1236                     pImage->paBlocks,
    1237                     getImageBlocks(&pImage->Header) * sizeof(VDIIMAGEBLOCKPOINTER),
    1238                     NULL);
     1228    rc = RTFileRead(pImage->File, pImage->paBlocks,
     1229                    getImageBlocks(&pImage->Header) * sizeof(VDIIMAGEBLOCKPOINTER), NULL);
    12391230    if (VBOX_FAILURE(rc))
    12401231        goto l_open_failed;
     
    14321423 * note: uBlock must be valid, readed data must not overlap block bounds.
    14331424 */
    1434 static int vdiReadInBlock(PVDIIMAGEDESC pImage, unsigned uBlock, unsigned offRead, unsigned cbToRead, void *pvBuf)
     1425static int vdiReadInBlock(PVDIIMAGEDESC pImage, unsigned uBlock, unsigned offRead,
     1426                          unsigned cbToRead, void *pvBuf)
    14351427{
    14361428    if (IS_VDI_IMAGE_BLOCK_ALLOCATED(pImage->paBlocks[uBlock]))
     
    16101602        }
    16111603
     1604        unsigned cBlocksAllocated = getImageBlocksAllocated(&pImage->Header);
     1605        pImage->paBlocks[uBlock] = cBlocksAllocated;
     1606        setImageBlocksAllocated(&pImage->Header, cBlocksAllocated + 1);
     1607
    16121608        if (    pImage->fFlags & VDI_IMAGE_FLAGS_ZERO_EXPAND
    16131609            ||  pImage->paBlocks[uBlock] == VDI_IMAGE_BLOCK_ZERO)
    16141610        {
    16151611            /* Fill newly allocated block by zeroes. */
    1616             unsigned cBlocksAllocated = getImageBlocksAllocated(&pImage->Header);
    1617             pImage->paBlocks[uBlock] = cBlocksAllocated;
    1618             setImageBlocksAllocated(&pImage->Header, cBlocksAllocated + 1);
    1619 
    1620             if (    offWrite != 0
    1621                 ||  cbToWrite != getImageBlockSize(&pImage->Header))
     1612
     1613            if (offWrite || cbToWrite != getImageBlockSize(&pImage->Header))
    16221614            {
    16231615                rc = vdiFillBlockByZeroes(pDisk, pImage, uBlock);
     
    16261618            }
    16271619        }
    1628         else
    1629         {
    1630             /* No need to fill block by zeroes. */
    1631             unsigned cBlocksAllocated = getImageBlocksAllocated(&pImage->Header);
    1632             pImage->paBlocks[uBlock] = cBlocksAllocated;
    1633             setImageBlocksAllocated(&pImage->Header, cBlocksAllocated + 1);
    1634         }
     1620
    16351621        rc = vdiUpdateBlockInfo(pImage, uBlock);
    16361622        if (VBOX_FAILURE(rc))
     
    17291715
    17301716    /* Calculate starting block number and offset inside it. */
    1731     unsigned uBlock = (unsigned)(offStart >> pImage->uShiftOffset2Index);
    1732     unsigned offWrite = (unsigned)offStart & pImage->uBlockMask;
    1733 
    1734     /* Save block size here for speed optimization. */
    1735     unsigned cbBlock = getImageBlockSize(&pImage->Header);
     1717    unsigned uBlock   = (unsigned)(offStart >> pImage->uShiftOffset2Index);
     1718    unsigned offWrite = (unsigned)offStart   & pImage->uBlockMask;
     1719    unsigned cbBlock  = getImageBlockSize(&pImage->Header);
    17361720
    17371721    /* loop through blocks */
     
    18701854            if (pfnProgress)
    18711855            {
    1872                 pfnProgress(NULL /* Achtung! pVM=NULL  */,
     1856                pfnProgress(NULL /* WARNING! pVM=NULL  */,
    18731857                            (uBlock * 100) / cBlocks,
    18741858                            pvUser);
     
    19311915            if (pfnProgress)
    19321916            {
    1933                 pfnProgress(NULL /* Achtung! pVM=NULL  */,
     1917                pfnProgress(NULL /* WARNING! pVM=NULL  */,
    19341918                            (uBlock * 100) / cBlocks,
    19351919                            pvUser);
     
    19441928
    19451929/**
     1930 * @note    Only used by tstVDI.
     1931 *
    19461932 * internal: commit last image(s) to selected previous image.
    19471933 * note: all images accessed across this call must be opened in R/W mode.
     
    20322018        if (pfnProgress)
    20332019        {
    2034             pfnProgress(NULL /* Achtung! pVM=NULL  */,
     2020            pfnProgress(NULL /* WARNING! pVM=NULL  */,
    20352021                        (uBlock * 100) / cBlocks,
    20362022                        pvUser);
     
    20832069    if (pfnProgress)
    20842070    {
    2085         pfnProgress(NULL /* Achtung! pVM=NULL */, 100, pvUser);
     2071        pfnProgress(NULL /* WARNING! pVM=NULL */, 100, pvUser);
    20862072       /* Note: commiting is non breakable operation, skipping rc here. */
    20872073    }
     
    21052091 * @param   cbComment       The size of pszComment buffer. 0 is ok.
    21062092 */
    2107 IDER3DECL(int) VDICheckImage(const char *pszFilename,
    2108                              unsigned *puVersion,
    2109                              PVDIIMAGETYPE penmType,
    2110                              uint64_t *pcbSize,
    2111                              PRTUUID pUuid,
    2112                              PRTUUID pParentUuid,
    2113                              char *pszComment,
    2114                              unsigned cbComment)
     2093IDER3DECL(int) VDICheckImage(const char *pszFilename, unsigned *puVersion, PVDIIMAGETYPE penmType,
     2094                             uint64_t *pcbSize, PRTUUID pUuid, PRTUUID pParentUuid,
     2095                             char *pszComment, unsigned cbComment)
    21152096{
    21162097    LogFlow(("VDICheckImage:\n"));
     
    22462227 * @param   pvUser          User argument for the progress callback.
    22472228 */
    2248 IDER3DECL(int) VDICreateBaseImage(const char *pszFilename, VDIIMAGETYPE enmType, uint64_t cbSize, const char *pszComment,
    2249                                   PFNVMPROGRESS pfnProgress, void *pvUser)
     2229IDER3DECL(int) VDICreateBaseImage(const char *pszFilename, VDIIMAGETYPE enmType, uint64_t cbSize,
     2230                                  const char *pszComment, PFNVMPROGRESS pfnProgress, void *pvUser)
    22502231{
    22512232    LogFlow(("VDICreateBaseImage:\n"));
     
    22782259 * @param   pvUser          User argument for the progress callback.
    22792260 */
    2280 IDER3DECL(int) VDICreateDifferenceImage(const char *pszFilename, const char *pszParent, const char *pszComment,
    2281                                         PFNVMPROGRESS pfnProgress, void *pvUser)
     2261IDER3DECL(int) VDICreateDifferenceImage(const char *pszFilename, const char *pszParent,
     2262                                        const char *pszComment, PFNVMPROGRESS pfnProgress,
     2263                                        void *pvUser)
    22822264{
    22832265    LogFlow(("VDICreateDifferenceImage:\n"));
     
    23432325 * @param   pvUser          User argument for the progress callback.
    23442326 */
    2345 IDER3DECL(int) VDICopyImage(const char *pszDstFilename, const char *pszSrcFilename, const char *pszComment,
    2346                             PFNVMPROGRESS pfnProgress, void *pvUser)
     2327IDER3DECL(int) VDICopyImage(const char *pszDstFilename, const char *pszSrcFilename,
     2328                            const char *pszComment, PFNVMPROGRESS pfnProgress, void *pvUser)
    23472329{
    23482330    LogFlow(("VDICopyImage:\n"));
     
    24612443                            {
    24622444                                c++;
    2463                                 rc = pfnProgress(NULL /* Achtung! pVM=NULL  */,
     2445                                rc = pfnProgress(NULL /* WARNING! pVM=NULL  */,
    24642446                                                 (c * 100) / cBlocks,
    24652447                                                 pvUser);
     
    24862468
    24872469        if (pfnProgress)
    2488             pfnProgress(NULL /* Achtung! pVM=NULL  */, 100, pvUser);
     2470            pfnProgress(NULL /* WARNING! pVM=NULL  */, 100, pvUser);
    24892471    }
    24902472
     
    24982480/**
    24992481 * Shrinks growing image file by removing zeroed data blocks.
     2482 * @note    Only used by vditool
    25002483 *
    25012484 * @returns VBox status code.
     
    25342517
    25352518    /* Working data. */
    2536     unsigned cbBlock = getImageBlockSize(&pImage->Header);
    2537     unsigned cBlocks = getImageBlocks(&pImage->Header);
     2519    unsigned cbBlock          = getImageBlockSize(&pImage->Header);
     2520    unsigned cBlocks          = getImageBlocks(&pImage->Header);
    25382521    unsigned cBlocksAllocated = getImageBlocksAllocated(&pImage->Header);
    25392522
     
    25502533    unsigned cBlocksAllocated2 = (unsigned)(cbData >> pImage->uShiftIndex2Offset);
    25512534    if (cbData != (uint64_t)cBlocksAllocated << pImage->uShiftIndex2Offset)
    2552         Log(("VDIShrinkImage: invalid image file length, cbBlock=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
     2535        Log(("VDIShrinkImage: invalid image file length, cbBlock=%u cBlocks=%u "
     2536             "cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
    25532537             cbBlock, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
    25542538
    25552539    /* Allocate second blocks array for back resolving. */
    2556     PVDIIMAGEBLOCKPOINTER paBlocks2 = (PVDIIMAGEBLOCKPOINTER)RTMemTmpAlloc(sizeof(VDIIMAGEBLOCKPOINTER) * cBlocks);
     2540    PVDIIMAGEBLOCKPOINTER paBlocks2 =
     2541                (PVDIIMAGEBLOCKPOINTER)RTMemTmpAlloc(sizeof(VDIIMAGEBLOCKPOINTER) * cBlocks);
    25572542    if (!paBlocks2)
    25582543    {
     
    25862571            else
    25872572            {
    2588                 Log(("VDIShrinkImage: block n=%u -> uBlock=%u is out of blocks range! (cbBlock=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu)\n",
     2573                Log(("VDIShrinkImage: block n=%u -> uBlock=%u is out of blocks range! (cbBlock=%u "
     2574                     "cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu)\n",
    25892575                     n, uBlock, cbBlock, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
    25902576                /* free link to invalid block. */
     
    26102596                if (VBOX_FAILURE(rc))
    26112597                {
    2612                     Log(("VDIShrinkImage: seek rc=%Vrc filename=\"%s\" uBlock=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
    2613                          rc, pImage->szFilename, uBlock, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
     2598                    Log(("VDIShrinkImage: seek rc=%Vrc filename=\"%s\" uBlock=%u cBlocks=%u "
     2599                         "cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
     2600                         rc, pImage->szFilename, uBlock, cBlocks, cBlocksAllocated,
     2601                         cBlocksAllocated2, cbData));
    26142602                    break;
    26152603                }
     
    26172605                if (VBOX_FAILURE(rc))
    26182606                {
    2619                     Log(("VDIShrinkImage: read rc=%Vrc filename=\"%s\" cbBlock=%u uBlock=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
    2620                          rc, pImage->szFilename, cbBlock, uBlock, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
     2607                    Log(("VDIShrinkImage: read rc=%Vrc filename=\"%s\" cbBlock=%u uBlock=%u "
     2608                         "cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
     2609                         rc, pImage->szFilename, cbBlock, uBlock, cBlocks, cBlocksAllocated,
     2610                         cBlocksAllocated2, cbData));
    26212611                    break;
    26222612                }
     
    26432633                        if (VBOX_FAILURE(rc))
    26442634                        {
    2645                             Log(("VDIShrinkImage: seek(2) rc=%Vrc filename=\"%s\" uBlockWrite=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
    2646                                  rc, pImage->szFilename, uBlockWrite, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
     2635                            Log(("VDIShrinkImage: seek(2) rc=%Vrc filename=\"%s\" uBlockWrite=%u "
     2636                                 "cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
     2637                                 rc, pImage->szFilename, uBlockWrite, cBlocks, cBlocksAllocated,
     2638                                 cBlocksAllocated2, cbData));
    26472639                            break;
    26482640                        }
     
    26502642                        if (VBOX_FAILURE(rc))
    26512643                        {
    2652                             Log(("VDIShrinkImage: write rc=%Vrc filename=\"%s\" cbBlock=%u uBlockWrite=%u cBlocks=%u cBlocksAllocated=%u cBlocksAllocated2=%u cbData=%llu\n",
    2653                                  rc, pImage->szFilename, cbBlock, uBlockWrite, cBlocks, cBlocksAllocated, cBlocksAllocated2, cbData));
     2644                            Log(("VDIShrinkImage: write rc=%Vrc filename=\"%s\" cbBlock=%u "
     2645                                 "uBlockWrite=%u cBlocks=%u cBlocksAllocated=%u "
     2646                                 "cBlocksAllocated2=%u cbData=%llu\n",
     2647                                 rc, pImage->szFilename, cbBlock, uBlockWrite, cBlocks,
     2648                                 cBlocksAllocated, cBlocksAllocated2, cbData));
    26542649                            break;
    26552650                        }
     
    26722667            if (pfnProgress)
    26732668            {
    2674                 pfnProgress(NULL /* Achtung! pVM=NULL  */,
     2669                pfnProgress(NULL /* WARNING! pVM=NULL  */,
    26752670                            (uBlock * 100) / cBlocksAllocated2,
    26762671                            pvUser);
     
    27072702        rc = vdiUpdateBlocks(pImage);
    27082703        if (pfnProgress)
    2709             pfnProgress(NULL /* Achtung! pVM=NULL */, 100, pvUser);
     2704            pfnProgress(NULL /* WARNING! pVM=NULL */, 100, pvUser);
    27102705    }
    27112706
     
    27232718/**
    27242719 * Converts image file from older VDI formats to current one.
     2720 * @note    Only used by vditool
    27252721 *
    27262722 * @returns VBox status code.
     
    28492845                {
    28502846                    c++;
    2851                     pfnProgress(NULL /* Achtung! pVM=NULL  */,
     2847                    pfnProgress(NULL /* WARNING! pVM=NULL  */,
    28522848                                (c * 100) / cMoves,
    28532849                                pvUser);
     
    28882884    if (pfnProgress)
    28892885    {
    2890         pfnProgress(NULL /* Achtung! pVM=NULL  */, 100, pvUser);
     2886        pfnProgress(NULL /* WARNING! pVM=NULL  */, 100, pvUser);
    28912887       /* Note: conversion is non breakable operation, skipping rc here. */
    28922888    }
     
    31553151    if (pfnProgress)
    31563152    {
    3157         pfnProgress(NULL /* Achtung! pVM=NULL */, 100, pvUser);
     3153        pfnProgress(NULL /* WARNING! pVM=NULL */, 100, pvUser);
    31583154       /* Note: commiting is non breakable operation, skipping rc here. */
    31593155    }
     
    40074003 * Note that in case of unrecoverable error all images of HDD container will be closed.
    40084004 *
     4005 * @note    Only used by tstVDI.
     4006 *
    40094007 * @returns VBox status code.
    40104008 * @param   pDisk           Pointer to VDI HDD container.
     
    40694067
    40704068/**
     4069 * @note    Only used by tstVDI.
     4070 *
    40714071 * Creates and opens a new differencing image file in HDD container.
    40724072 * See comments for VDIDiskOpenImage function about differencing images.
     
    40794079 * @param   pvUser          User argument for the progress callback.
    40804080 */
    4081 IDER3DECL(int) VDIDiskCreateOpenDifferenceImage(PVDIDISK pDisk, const char *pszFilename, const char *pszComment,
    4082                                                 PFNVMPROGRESS pfnProgress, void *pvUser)
     4081IDER3DECL(int) VDIDiskCreateOpenDifferenceImage(PVDIDISK pDisk, const char *pszFilename,
     4082                                                const char *pszComment, PFNVMPROGRESS pfnProgress,
     4083                                                void *pvUser)
    40834084{
    40844085    LogFlow(("VDIDiskCreateOpenDifferenceImage:\n"));
     
    41154116
    41164117/**
     4118 * @note    Only used by tstVDI.
     4119 *
    41174120 * internal: debug image dump.
    41184121 */
     
    41384141                getImageDataOffset(&pImage->Header));
    41394142    PVDIDISKGEOMETRY pg = getImageGeometry(&pImage->Header);
    4140     RTLogPrintf("Header->Geometry: C/H/S=%u/%u/%u cbSector=%u Mode=%u\n",
     4143    RTLogPrintf("Header: Geometry: C/H/S=%u/%u/%u cbSector=%u Mode=%u\n",
    41414144                pg->cCylinders, pg->cHeads, pg->cSectors, pg->cbSector,
    41424145                getImageTranslation(&pImage->Header));
     
    41464149    if (GET_MAJOR_HEADER_VERSION(&pImage->Header) >= 1)
    41474150        RTLogPrintf("Header: uuidParentModification={%Vuuid}\n", getImageParentModificationUUID(&pImage->Header));
    4148     RTLogPrintf("Image: fFlags=%08X offStartBlocks=%u offStartData=%u\n",
     4151    RTLogPrintf("Image:  fFlags=%08X offStartBlocks=%u offStartData=%u\n",
    41494152                pImage->fFlags, pImage->offStartBlocks, pImage->offStartData);
    4150     RTLogPrintf("Image: uBlockMask=%08X uShiftIndex2Offset=%u uShiftOffset2Index=%u offStartBlockData=%u\n",
     4153    RTLogPrintf("Image:  uBlockMask=%08X uShiftIndex2Offset=%u uShiftOffset2Index=%u offStartBlockData=%u\n",
    41514154                pImage->uBlockMask,
    41524155                pImage->uShiftIndex2Offset,
    41534156                pImage->uShiftOffset2Index,
    41544157                pImage->offStartBlockData);
     4158
     4159    unsigned uBlock, cBlocksNotFree, cBadBlocks, cBlocks = getImageBlocks(&pImage->Header);
     4160    for (uBlock=0, cBlocksNotFree=0, cBadBlocks=0; uBlock<cBlocks; uBlock++)
     4161    {
     4162        if (IS_VDI_IMAGE_BLOCK_ALLOCATED(pImage->paBlocks[uBlock]))
     4163        {
     4164            cBlocksNotFree++;
     4165            if (pImage->paBlocks[uBlock] >= cBlocks)
     4166                cBadBlocks++;
     4167        }
     4168    }
     4169    if (cBlocksNotFree != getImageBlocksAllocated(&pImage->Header))
     4170    {
     4171        RTLogPrintf("!! WARNING: %u blocks actually allocated (cBlocksAllocated=%u) !!\n",
     4172                cBlocksNotFree, getImageBlocksAllocated(&pImage->Header));
     4173    }
     4174    if (cBadBlocks)
     4175    {
     4176        RTLogPrintf("!! WARNING: %u bad blocks found !!\n",
     4177                cBadBlocks);
     4178    }
    41554179}
    41564180
    41574181/**
    41584182 * Debug helper - dumps all opened images of HDD container into the log file.
     4183 * @note    Only used by tstVDI and vditool
    41594184 *
    41604185 * @param   pDisk           Pointer to VDI HDD container.
     
    42434268        int rc = CFGMR3QueryStringAlloc(pCurNode, "Path", &pszName);
    42444269        if (VBOX_FAILURE(rc))
    4245         {
    4246             AssertMsgFailed(("Configuration error: %d - query for \"Path\" string return %Vrc.\n", iLevel, rc));
    4247             return rc;
    4248         }
     4270            return PDMDRV_SET_ERROR(pDrvIns, rc,
     4271                                    N_("VHDD: Configuration error: Querying \"Path\" as "
     4272                                       "string failed"));
    42494273
    42504274        bool fReadOnly;
     
    42544278        else if (VBOX_FAILURE(rc))
    42554279        {
    4256             AssertMsgFailed(("Configuration error: %d - query for \"ReadOnly\" boolean return %Vrc.\n", iLevel, rc));
    42574280            MMR3HeapFree(pszName);
    4258             return rc;
     4281            return PDMDRV_SET_ERROR(pDrvIns, rc,
     4282                                    N_("VHDD: Configuration error: Querying \"ReadOnly\" as "
     4283                                       "boolean failed"));
    42594284        }
    42604285
     
    42624287         * Open the image.
    42634288         */
    4264         rc = VDIDiskOpenImage(pData, pszName, !fReadOnly ? VDI_OPEN_FLAGS_NORMAL : VDI_OPEN_FLAGS_READONLY);
     4289        rc = VDIDiskOpenImage(pData, pszName, fReadOnly ? VDI_OPEN_FLAGS_READONLY
     4290                                                        : VDI_OPEN_FLAGS_NORMAL);
    42654291        if (VBOX_SUCCESS(rc))
    42664292            Log(("vdiConstruct: %d - Opened '%s' in %s mode\n",
     
    42844310    int rc = CFGMR3QueryStringAlloc(pCfgHandle, "Path", &pszName);
    42854311    if (VBOX_FAILURE(rc))
    4286     {
    4287         AssertMsgFailed(("Configuration error: query for \"Path\" string return %Vrc.\n", rc));
    4288         return rc;
    4289     }
     4312        return PDMDRV_SET_ERROR(pDrvIns, rc,
     4313                                N_("VHDD: Configuration error: Querying \"Path\" as "
     4314                                   "string failed"));
    42904315
    42914316    /** True if the media is readonly. */
     
    42964321    else if (VBOX_FAILURE(rc))
    42974322    {
    4298         AssertMsgFailed(("Configuration error: query for \"ReadOnly\" boolean return %Vrc.\n", rc));
    42994323        MMR3HeapFree(pszName);
     4324        return PDMDRV_SET_ERROR(pDrvIns, rc,
     4325                                N_("VHDD: Configuration error: Querying \"ReadOnly\" as "
     4326                                   "boolean failed"));
    43004327        return rc;
    43014328    }
     
    43044331     * Open the image.
    43054332     */
    4306     rc = VDIDiskOpenImage(pData, pszName, !fReadOnly ? VDI_OPEN_FLAGS_NORMAL : VDI_OPEN_FLAGS_READONLY);
     4333    rc = VDIDiskOpenImage(pData, pszName, fReadOnly ? VDI_OPEN_FLAGS_READONLY
     4334                                                    : VDI_OPEN_FLAGS_NORMAL);
    43074335    if (VBOX_SUCCESS(rc))
    4308         Log(("vdiConstruct: Opened '%s' in %s mode\n", pszName, VDIDiskIsReadOnly(pData) ? "read-only" : "read-write"));
     4336        Log(("vdiConstruct: Opened '%s' in %s mode\n",
     4337              pszName, VDIDiskIsReadOnly(pData) ? "read-only" : "read-write"));
    43094338    else
    43104339        AssertMsgFailed(("Failed to open image '%s' rc=%Vrc\n", pszName, rc));
     
    43254354 * @param   pDrvIns     The driver instance data.
    43264355 */
    4327 static DECLCALLBACK(void)   vdiDestruct(PPDMDRVINS pDrvIns)
     4356static DECLCALLBACK(void) vdiDestruct(PPDMDRVINS pDrvIns)
    43284357{
    43294358    LogFlow(("vdiDestruct:\n"));
     
    44804509
    44814510/** @copydoc PDMIMEDIA::pfnBiosGetTranslation */
    4482 static DECLCALLBACK(int) vdiBiosGetTranslation(PPDMIMEDIA pInterface, PPDMBIOSTRANSLATION penmTranslation)
     4511static DECLCALLBACK(int) vdiBiosGetTranslation(PPDMIMEDIA pInterface,
     4512                                               PPDMBIOSTRANSLATION penmTranslation)
    44834513{
    44844514    PVDIDISK pData = PDMIMEDIA_2_VDIDISK(pInterface);
     
    44894519
    44904520/** @copydoc PDMIMEDIA::pfnBiosSetTranslation */
    4491 static DECLCALLBACK(int) vdiBiosSetTranslation(PPDMIMEDIA pInterface, PDMBIOSTRANSLATION enmTranslation)
     4521static DECLCALLBACK(int) vdiBiosSetTranslation(PPDMIMEDIA pInterface,
     4522                                               PDMBIOSTRANSLATION enmTranslation)
    44924523{
    44934524    PVDIDISK pData = PDMIMEDIA_2_VDIDISK(pInterface);
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