27
27
#include " MFTOffline.h"
28
28
#include " OfflineMFTReader.h"
29
29
30
+ #include " Utils/Round.h"
30
31
#include " Utils/TypeTraits.h"
31
32
#include " Text/Fmt/Boolean.h"
32
33
#include " Text/Fmt/Limit.h"
@@ -1006,11 +1007,6 @@ HRESULT Main::CommandVss()
1006
1007
return S_OK;
1007
1008
}
1008
1009
1009
- constexpr uint64_t RoundUp (uint64_t offset, uint64_t pageSize)
1010
- {
1011
- return (((offset)) + pageSize - 1 ) & (~(pageSize - 1 ));
1012
- }
1013
-
1014
1010
HRESULT Orc::Command::NTFSUtil::Main::CommandBitLocker ()
1015
1011
{
1016
1012
using namespace BitLocker ;
@@ -1109,7 +1105,7 @@ HRESULT Orc::Command::NTFSUtil::Main::CommandBitLocker()
1109
1105
// Reset pointer to start of info data
1110
1106
reader->Seek (pHeader->InfoOffsets [i]);
1111
1107
1112
- auto toRead = RoundUp (infoSize + sizeof (ValidationHeader), pHeader->SectorSize );
1108
+ auto toRead = RoundUpPow2 (infoSize + sizeof (ValidationHeader), pHeader->SectorSize );
1113
1109
info_buffer.SetCount (toRead);
1114
1110
reader->Read (info_buffer, toRead, ullBytesRead);
1115
1111
@@ -1121,7 +1117,7 @@ HRESULT Orc::Command::NTFSUtil::Main::CommandBitLocker()
1121
1117
continue ;
1122
1118
}
1123
1119
1124
- const Traits::ByteQuantity size (RoundUp (infoSize + pValidation->Size , pHeader->SectorSize ));
1120
+ const Traits::ByteQuantity size (RoundUpPow2 (infoSize + pValidation->Size , pHeader->SectorSize ));
1125
1121
PrintValue (metadataNode, L" Size" , size);
1126
1122
}
1127
1123
}
0 commit comments