Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: file_hasher.cc

Issue 6811030: verity: remove the depth parameter from bht_create (Closed) Base URL: http://git.chromium.org/git/dm-verity.git@master
Patch Set: Fix per review. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« dm-bht_unittest.cc ('K') | « file_hasher.h ('k') | verity_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: file_hasher.cc
diff --git a/file_hasher.cc b/file_hasher.cc
index 14e96040bf0747206629688e7b3cd902ceeb99a0..90c1adfc1fd556ac30a72210cb5043047820e682 100644
--- a/file_hasher.cc
+++ b/file_hasher.cc
@@ -45,12 +45,10 @@ int FileHasher::WriteCallback(void *file,
bool FileHasher::Initialize(simple_file::File *source,
simple_file::File *destination,
- unsigned int depth,
unsigned int blocks,
const char *alg) {
if (!alg || !source || !destination) {
LOG(ERROR) << "Invalid arguments supplied to Initialize";
- LOG(INFO) << "depth: " << depth;
LOG(INFO) << "s: " << source << " d: " << destination;
return false;
}
@@ -73,11 +71,10 @@ bool FileHasher::Initialize(simple_file::File *source,
alg_ = alg;
source_ = source;
destination_ = destination;
- depth_ = depth;
block_limit_ = blocks;
// Now we initialize the tree
- if (dm_bht_create(&tree_, depth_, block_limit_, alg_)) {
+ if (dm_bht_create(&tree_, block_limit_, alg_)) {
LOG(ERROR) << "Could not create the BH tree";
return false;
}
@@ -120,8 +117,8 @@ void FileHasher::PrintTable(bool colocated) {
unsigned int hash_start = 0;
unsigned int root_end = to_sector(block_limit_ << PAGE_SHIFT);
if (colocated) hash_start = root_end;
- printf("0 %u verity ROOT_DEV HASH_DEV %u %u %s %s\n",
- root_end, hash_start, depth_, alg_, digest);
+ printf("0 %u verity ROOT_DEV HASH_DEV %u 0 %s %s\n",
+ root_end, hash_start, alg_, digest);
}
} // namespace verity
« dm-bht_unittest.cc ('K') | « file_hasher.h ('k') | verity_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698