Changeset 76256 in vbox for trunk/src/VBox
- Timestamp:
- Dec 16, 2018 8:36:28 PM (6 years ago)
- Location:
- trunk/src/VBox/Runtime/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fs/extvfs.cpp
r76221 r76256 126 126 } 127 127 128 uint64_t offRead = (pThis->iSbBlock + 1) * pThis->cbBlock;129 EXTBLOCKGROUPDESC 128 uint64_t offRead = (pThis->iSbBlock + 1) * pThis->cbBlock; 129 EXTBLOCKGROUPDESC32 BlkDesc; 130 130 int rc = RTVfsFileReadAt(pThis->hVfsBacking, offRead, &BlkDesc, sizeof(BlkDesc), NULL); 131 131 if (RT_SUCCESS(rc)) … … 133 133 pBlkGrpDesc->offStart = pThis->iSbBlock + (uint64_t)iBlkGrp * pThis->cBlocksPerGroup * pThis->cbBlock; 134 134 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, 136 136 &pBlkGrpDesc->abBlockBitmap[0], cbBlockBitmap, NULL); 137 137 } … … 279 279 /** @todo Convert to host endianess. */ 280 280 #endif 281 if (SuperBlock.u16FilesystemState == EXT_S TATE_ERRORS)281 if (SuperBlock.u16FilesystemState == EXT_SB_STATE_ERRORS) 282 282 rc = RTERRINFO_LOG_SET(pErrInfo, VERR_FILESYSTEM_CORRUPT, "EXT_STATE_ERRORS"); 283 283 else 284 284 { 285 285 pThis->iSbBlock = SuperBlock.iBlockOfSuperblock; 286 pThis->cbBlock = 1024 << SuperBlock.c BitsShiftLeftBlockSize;286 pThis->cbBlock = 1024 << SuperBlock.cLogBlockSize; 287 287 pThis->cBlocksPerGroup = SuperBlock.cBlocksPerGroup; 288 pThis->cBlockGroups = SuperBlock.cBlocksTotal / pThis->cBlocksPerGroup;288 pThis->cBlockGroups = SuperBlock.cBlocksTotalLow / pThis->cBlocksPerGroup; 289 289 290 290 /* Load first block group descriptor. */ -
trunk/src/VBox/Runtime/common/vfs/vfsmount.cpp
r76216 r76256 359 359 static bool rtVfsMountIsExt(PCEXTSUPERBLOCK pSuperBlock) 360 360 { 361 if (RT_LE2H_U16(pSuperBlock->u16Signature) != EXT_S IGNATURE)362 return false; 363 364 uint32_t cShift = RT_LE2H_U32(pSuperBlock->c BitsShiftLeftBlockSize);361 if (RT_LE2H_U16(pSuperBlock->u16Signature) != EXT_SB_SIGNATURE) 362 return false; 363 364 uint32_t cShift = RT_LE2H_U32(pSuperBlock->cLogBlockSize); 365 365 if (cShift > 54) 366 366 { 367 Log2(("rtVfsMountIsExt: c BitsShiftLeftBlockSize=%#x: out of range\n", cShift));368 return false; 369 } 370 371 cShift = RT_LE2H_U32(pSuperBlock->c BitsShiftLeftFragmentSize);367 Log2(("rtVfsMountIsExt: cLogBlockSize=%#x: out of range\n", cShift)); 368 return false; 369 } 370 371 cShift = RT_LE2H_U32(pSuperBlock->cLogClusterSize); 372 372 if (cShift > 54) 373 373 { 374 Log2(("rtVfsMountIsExt: c BitsShiftLeftFragmentSize=%#x: out of range\n", cShift));374 Log2(("rtVfsMountIsExt: cLogClusterSize=%#x: out of range\n", cShift)); 375 375 return false; 376 376 }
Note:
See TracChangeset
for help on using the changeset viewer.