[VFS] Fix GetHashEntry for level 2 entries...
This commit is contained in:
parent
c552a853e0
commit
5ec81298f2
|
@ -683,12 +683,9 @@ StfsContainerDevice::BlockHash StfsContainerDevice::GetHashEntry(
|
|||
const uint8_t* map_ptr, uint32_t block_index, uint32_t level,
|
||||
uint32_t table_offset) {
|
||||
uint32_t record = block_index;
|
||||
if (level == 1) {
|
||||
for (uint32_t i = 0; i < level; i++) {
|
||||
record = record / 0xAA;
|
||||
}
|
||||
if (level == 2) {
|
||||
record = record / 0x70E4;
|
||||
}
|
||||
record = record % 0xAA;
|
||||
|
||||
size_t hash_offset = BlockToHashBlockOffset(block_index, level);
|
||||
|
|
|
@ -227,10 +227,8 @@ class StfsContainerDevice : public Device {
|
|||
|
||||
size_t BlockToHashBlockOffset(uint64_t block, uint32_t hash_level = 0);
|
||||
|
||||
StfsContainerDevice::BlockHash GetHashEntry(const uint8_t* map_ptr,
|
||||
uint32_t block_index,
|
||||
uint32_t level,
|
||||
uint32_t table_offset);
|
||||
BlockHash GetHashEntry(const uint8_t* map_ptr, uint32_t block_index,
|
||||
uint32_t level, uint32_t table_offset);
|
||||
|
||||
BlockHash GetBlockHash(const uint8_t* map_ptr, uint32_t block_index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue