VirtualBox

Changeset 76256 in vbox for trunk/src/VBox/Runtime/common/fs


Ignore:
Timestamp:
Dec 16, 2018 8:36:28 PM (6 years ago)
Author:
vboxsync
Message:

Runtime/formats/ext: Add more structures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/fs/extvfs.cpp

    r76221 r76256  
    126126    }
    127127
    128     uint64_t           offRead = (pThis->iSbBlock + 1) * pThis->cbBlock;
    129     EXTBLOCKGROUPDESC  BlkDesc;
     128    uint64_t            offRead = (pThis->iSbBlock + 1) * pThis->cbBlock;
     129    EXTBLOCKGROUPDESC32 BlkDesc;
    130130    int rc = RTVfsFileReadAt(pThis->hVfsBacking, offRead, &BlkDesc, sizeof(BlkDesc), NULL);
    131131    if (RT_SUCCESS(rc))
     
    133133        pBlkGrpDesc->offStart = pThis->iSbBlock + (uint64_t)iBlkGrp * pThis->cBlocksPerGroup * pThis->cbBlock;
    134134        pBlkGrpDesc->offLast  = pBlkGrpDesc->offStart + pThis->cBlocksPerGroup * pThis->cbBlock;
    135         rc = RTVfsFileReadAt(pThis->hVfsBacking, BlkDesc.offBlockBitmap * pThis->cbBlock,
     135        rc = RTVfsFileReadAt(pThis->hVfsBacking, BlkDesc.offBlockBitmapLow * pThis->cbBlock,
    136136                             &pBlkGrpDesc->abBlockBitmap[0], cbBlockBitmap, NULL);
    137137    }
     
    279279            /** @todo Convert to host endianess. */
    280280#endif
    281             if (SuperBlock.u16FilesystemState == EXT_STATE_ERRORS)
     281            if (SuperBlock.u16FilesystemState == EXT_SB_STATE_ERRORS)
    282282                rc = RTERRINFO_LOG_SET(pErrInfo, VERR_FILESYSTEM_CORRUPT, "EXT_STATE_ERRORS");
    283283            else
    284284            {
    285285                pThis->iSbBlock = SuperBlock.iBlockOfSuperblock;
    286                 pThis->cbBlock = 1024 << SuperBlock.cBitsShiftLeftBlockSize;
     286                pThis->cbBlock = 1024 << SuperBlock.cLogBlockSize;
    287287                pThis->cBlocksPerGroup = SuperBlock.cBlocksPerGroup;
    288                 pThis->cBlockGroups = SuperBlock.cBlocksTotal / pThis->cBlocksPerGroup;
     288                pThis->cBlockGroups = SuperBlock.cBlocksTotalLow / pThis->cBlocksPerGroup;
    289289
    290290                /* Load first block group descriptor. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette