Changeset 76216 in vbox for trunk/src/VBox/Runtime/common/vfs
- Timestamp:
- Dec 13, 2018 7:26:25 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127483
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/vfs/vfsmount.cpp
r73097 r76216 45 45 #include <iprt/formats/iso9660.h> 46 46 #include <iprt/formats/udf.h> 47 #include <iprt/formats/ext 2.h>47 #include <iprt/formats/ext.h> 48 48 49 49 … … 352 352 353 353 /** 354 * Check if the given bootsector is an HPFS boot sector.354 * Check if the given bootsector is an ext2/3/4 super block. 355 355 * 356 356 * @returns true if NTFS, false if not. 357 357 * @param pSuperBlock The ext2 superblock. 358 358 */ 359 static bool rtVfsMountIsExt 2(PCEXT2SUPERBLOCK pSuperBlock)360 { 361 if (RT_LE2H_U16(pSuperBlock->u16Signature) != EXT 2_SIGNATURE)359 static bool rtVfsMountIsExt(PCEXTSUPERBLOCK pSuperBlock) 360 { 361 if (RT_LE2H_U16(pSuperBlock->u16Signature) != EXT_SIGNATURE) 362 362 return false; 363 363 … … 365 365 if (cShift > 54) 366 366 { 367 Log2(("rtVfsMountIsExt 2: cBitsShiftLeftBlockSize=%#x: out of range\n", cShift));367 Log2(("rtVfsMountIsExt: cBitsShiftLeftBlockSize=%#x: out of range\n", cShift)); 368 368 return false; 369 369 } … … 372 372 if (cShift > 54) 373 373 { 374 Log2(("rtVfsMountIsExt 2: cBitsShiftLeftFragmentSize=%#x: out of range\n", cShift));374 Log2(("rtVfsMountIsExt: cBitsShiftLeftFragmentSize=%#x: out of range\n", cShift)); 375 375 return false; 376 376 } … … 435 435 } 436 436 437 AssertCompile(sizeof(*pBuf) >= 1024 + sizeof(EXT 2SUPERBLOCK));438 if (rtVfsMountIsExt 2((PCEXT2SUPERBLOCK)&pBuf->ab[1024]))439 { 440 Log(("RTVfsMount: Detected ISO-9660 or UDF.\n"));441 return RTFsExt 2VolOpen(hVfsFileIn, fFlags, 0 /*fExt2Flags*/, phVfs, pErrInfo);437 AssertCompile(sizeof(*pBuf) >= 1024 + sizeof(EXTSUPERBLOCK)); 438 if (rtVfsMountIsExt((PCEXTSUPERBLOCK)&pBuf->ab[1024])) 439 { 440 Log(("RTVfsMount: Detected EXT2/3/4.\n")); 441 return RTFsExtVolOpen(hVfsFileIn, fFlags, 0 /*fExt2Flags*/, phVfs, pErrInfo); 442 442 } 443 443
Note:
See TracChangeset
for help on using the changeset viewer.