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

Side by Side Diff: generate_delta_main.cc

Issue 3767002: AU: Really delta compress the kernel if an old kernel is provided. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: Created 10 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « delta_performer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sys/types.h> 5 #include <sys/types.h>
6 #include <sys/stat.h> 6 #include <sys/stat.h>
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 LOG(INFO) << "done applying delta."; 95 LOG(INFO) << "done applying delta.";
96 return 0; 96 return 0;
97 } 97 }
98 CHECK(!FLAGS_new_image.empty()); 98 CHECK(!FLAGS_new_image.empty());
99 CHECK(!FLAGS_out_file.empty()); 99 CHECK(!FLAGS_out_file.empty());
100 CHECK(!FLAGS_new_kernel.empty()); 100 CHECK(!FLAGS_new_kernel.empty());
101 if (FLAGS_old_image.empty()) { 101 if (FLAGS_old_image.empty()) {
102 LOG(INFO) << "Generating full update"; 102 LOG(INFO) << "Generating full update";
103 } else { 103 } else {
104 LOG(INFO) << "Generating delta update"; 104 LOG(INFO) << "Generating delta update";
105 CHECK(!FLAGS_old_kernel.empty());
106 CHECK(!FLAGS_old_dir.empty()); 105 CHECK(!FLAGS_old_dir.empty());
107 CHECK(!FLAGS_new_dir.empty()); 106 CHECK(!FLAGS_new_dir.empty());
108 if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) { 107 if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) {
109 LOG(FATAL) << "old_dir or new_dir not directory"; 108 LOG(FATAL) << "old_dir or new_dir not directory";
110 } 109 }
111 } 110 }
112 DeltaDiffGenerator::GenerateDeltaUpdateFile(FLAGS_old_dir, 111 DeltaDiffGenerator::GenerateDeltaUpdateFile(FLAGS_old_dir,
113 FLAGS_old_image, 112 FLAGS_old_image,
114 FLAGS_new_dir, 113 FLAGS_new_dir,
115 FLAGS_new_image, 114 FLAGS_new_image,
116 FLAGS_old_kernel, 115 FLAGS_old_kernel,
117 FLAGS_new_kernel, 116 FLAGS_new_kernel,
118 FLAGS_out_file, 117 FLAGS_out_file,
119 FLAGS_private_key); 118 FLAGS_private_key);
120 119
121 return 0; 120 return 0;
122 } 121 }
123 122
124 } // namespace {} 123 } // namespace {}
125 124
126 } // namespace chromeos_update_engine 125 } // namespace chromeos_update_engine
127 126
128 int main(int argc, char** argv) { 127 int main(int argc, char** argv) {
129 return chromeos_update_engine::Main(argc, argv); 128 return chromeos_update_engine::Main(argc, argv);
130 } 129 }
OLDNEW
« no previous file with comments | « delta_performer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698