Chromium Code Reviews| Index: generate_delta_main.cc |
| diff --git a/generate_delta_main.cc b/generate_delta_main.cc |
| index efeeb3b6038574b38df5ae616994b583c6f1e362..8a98c0980557101e477bf18208c32aeadcc236cd 100644 |
| --- a/generate_delta_main.cc |
| +++ b/generate_delta_main.cc |
| @@ -76,7 +76,22 @@ int Main(int argc, char** argv) { |
| LOG(INFO) << "Setting up preferences under: " << FLAGS_prefs_dir; |
| LOG_IF(ERROR, !prefs.Init(FilePath(FLAGS_prefs_dir))) |
| << "Failed to initialize preferences."; |
| + // Get original checksums |
| + LOG(INFO) << "Calculating original checksums"; |
| + PartitionInfo kern_info, root_info; |
| + CHECK(InitializePartitionInfo(true, // is_kernel |
| + FLAGS_old_kernel, |
| + &kern_info)); |
| + CHECK(InitializePartitionInfo(false, // is_kernel |
| + FLAGS_old_image, |
| + &root_info)); |
| + vector<char> kern_hash(kern_info.hash().begin(), |
| + kern_info.hash().end()); |
| + vector<char> root_hash(root_info.hash().begin(), |
| + root_info.hash().end()); |
|
petkov
2010/10/22 20:15:16
indent is off.
adlr
2010/10/22 20:40:18
Done.
|
| DeltaPerformer performer(&prefs); |
| + performer.set_current_kernel_hash(&kern_hash); |
| + performer.set_current_rootfs_hash(&root_hash); |
| CHECK_EQ(performer.Open(FLAGS_old_image.c_str(), 0, 0), 0); |
| CHECK(performer.OpenKernel(FLAGS_old_kernel.c_str())); |
| vector<char> buf(1024 * 1024); |