Index: generate_delta_main.cc |
diff --git a/generate_delta_main.cc b/generate_delta_main.cc |
index ab05c77c0d5335f2e18e636a6d76a9e49eefad65..c66d9d1026f74a85665ebf6b6b83ced823ced160 100644 |
--- a/generate_delta_main.cc |
+++ b/generate_delta_main.cc |
@@ -92,17 +92,20 @@ int Main(int argc, char** argv) { |
LOG(INFO) << "done applying delta."; |
return 0; |
} |
- CHECK(!FLAGS_old_dir.empty()); |
- CHECK(!FLAGS_new_dir.empty()); |
- CHECK(!FLAGS_old_image.empty()); |
CHECK(!FLAGS_new_image.empty()); |
CHECK(!FLAGS_out_file.empty()); |
- CHECK(!FLAGS_old_kernel.empty()); |
CHECK(!FLAGS_new_kernel.empty()); |
- if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) { |
- LOG(FATAL) << "old_dir or new_dir not directory"; |
+ if (FLAGS_old_image.empty()) { |
+ LOG(INFO) << "Generating full update"; |
+ } else { |
+ LOG(INFO) << "Generating delta update"; |
+ CHECK(!FLAGS_old_kernel.empty()); |
+ CHECK(!FLAGS_old_dir.empty()); |
+ CHECK(!FLAGS_new_dir.empty()); |
+ if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) { |
+ LOG(FATAL) << "old_dir or new_dir not directory"; |
+ } |
} |
- |
DeltaDiffGenerator::GenerateDeltaUpdateFile(FLAGS_old_dir, |
FLAGS_old_image, |
FLAGS_new_dir, |