Changeset 69619 in vbox
- Timestamp:
- Nov 8, 2017 3:46:10 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 118979
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/fs/fatvfs.cpp
r69616 r69619 5012 5012 return RTErrInfoSetF(pErrInfo, VERR_VFS_BOGUS_FORMAT, 5013 5013 "Media byte and FAT ID mismatch: %#x vs %#x (%.7Rhxs)", pbFatSector[0], pThis->bMedia, pbFatSector); 5014 uint32_t idxOurEndOfChain; 5014 5015 switch (pThis->enmFatType) 5015 5016 { … … 5019 5020 pThis->idxMaxLastCluster = FAT_LAST_FAT12_DATA_CLUSTER; 5020 5021 pThis->idxEndOfChain = (pbFatSector[1] >> 4) | ((uint32_t)pbFatSector[2] << 4); 5022 idxOurEndOfChain = FAT_FIRST_FAT12_EOC; 5021 5023 break; 5022 5024 … … 5026 5028 pThis->idxMaxLastCluster = FAT_LAST_FAT16_DATA_CLUSTER; 5027 5029 pThis->idxEndOfChain = RT_MAKE_U16(pbFatSector[2], pbFatSector[3]); 5030 idxOurEndOfChain = FAT_FIRST_FAT16_EOC; 5028 5031 break; 5029 5032 … … 5035 5038 pThis->idxMaxLastCluster = FAT_LAST_FAT32_DATA_CLUSTER; 5036 5039 pThis->idxEndOfChain = RT_MAKE_U32_FROM_U8(pbFatSector[4], pbFatSector[5], pbFatSector[6], pbFatSector[7]); 5040 idxOurEndOfChain = FAT_FIRST_FAT32_EOC; 5037 5041 break; 5038 5042 5039 5043 default: AssertFailedReturn(VERR_INTERNAL_ERROR_2); 5040 5044 } 5045 5041 5046 if (pThis->idxEndOfChain <= pThis->idxMaxLastCluster) 5042 return RTErrInfoSetF(pErrInfo, VERR_VFS_BOGUS_FORMAT, "Bogus formatter end-of-chain value: %#x, must be above %#x", 5043 pThis->idxEndOfChain, pThis->idxMaxLastCluster); 5047 { 5048 Log(("rtFsFatVolTryInitDos2Plus: Bogus idxEndOfChain=%#x, using %#x instead\n", pThis->idxEndOfChain, idxOurEndOfChain)); 5049 pThis->idxEndOfChain = idxOurEndOfChain; 5050 } 5044 5051 5045 5052 RT_NOREF(pbFatSector);
Note:
See TracChangeset
for help on using the changeset viewer.