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

Side by Side Diff: generate_delta_main.cc

Issue 3132033: AU: Sign delta payloads (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: fixes for review Created 10 years, 4 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
« no previous file with comments | « delta_performer_unittest.cc ('k') | omaha_hash_calculator.h » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium 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 #include <set> 10 #include <set>
(...skipping 11 matching lines...) Expand all
22 22
23 DEFINE_string(old_dir, "", 23 DEFINE_string(old_dir, "",
24 "Directory where the old rootfs is loop mounted read-only"); 24 "Directory where the old rootfs is loop mounted read-only");
25 DEFINE_string(new_dir, "", 25 DEFINE_string(new_dir, "",
26 "Directory where the new rootfs is loop mounted read-only"); 26 "Directory where the new rootfs is loop mounted read-only");
27 DEFINE_string(old_image, "", "Path to the old rootfs"); 27 DEFINE_string(old_image, "", "Path to the old rootfs");
28 DEFINE_string(new_image, "", "Path to the new rootfs"); 28 DEFINE_string(new_image, "", "Path to the new rootfs");
29 DEFINE_string(out_file, "", "Path to output file"); 29 DEFINE_string(out_file, "", "Path to output file");
30 DEFINE_string(old_kernel, "", "Path to the old kernel partition image"); 30 DEFINE_string(old_kernel, "", "Path to the old kernel partition image");
31 DEFINE_string(new_kernel, "", "Path to the new kernel partition image"); 31 DEFINE_string(new_kernel, "", "Path to the new kernel partition image");
32 DEFINE_string(private_key, "", "Path to private key in .pem format");
32 DEFINE_string(apply_delta, "", 33 DEFINE_string(apply_delta, "",
33 "If set, apply delta over old_image. (For debugging.)"); 34 "If set, apply delta over old_image. (For debugging.)");
34 35
35 // This file contains a simple program that takes an old path, a new path, 36 // This file contains a simple program that takes an old path, a new path,
36 // and an output file as arguments and the path to an output file and 37 // and an output file as arguments and the path to an output file and
37 // generates a delta that can be sent to Chrome OS clients. 38 // generates a delta that can be sent to Chrome OS clients.
38 39
39 using std::set; 40 using std::set;
40 using std::string; 41 using std::string;
41 using std::vector; 42 using std::vector;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) { 92 if ((!IsDir(FLAGS_old_dir.c_str())) || (!IsDir(FLAGS_new_dir.c_str()))) {
92 LOG(FATAL) << "old_dir or new_dir not directory"; 93 LOG(FATAL) << "old_dir or new_dir not directory";
93 } 94 }
94 95
95 DeltaDiffGenerator::GenerateDeltaUpdateFile(FLAGS_old_dir, 96 DeltaDiffGenerator::GenerateDeltaUpdateFile(FLAGS_old_dir,
96 FLAGS_old_image, 97 FLAGS_old_image,
97 FLAGS_new_dir, 98 FLAGS_new_dir,
98 FLAGS_new_image, 99 FLAGS_new_image,
99 FLAGS_old_kernel, 100 FLAGS_old_kernel,
100 FLAGS_new_kernel, 101 FLAGS_new_kernel,
101 FLAGS_out_file); 102 FLAGS_out_file,
103 FLAGS_private_key);
102 104
103 return 0; 105 return 0;
104 } 106 }
105 107
106 } // namespace {} 108 } // namespace {}
107 109
108 } // namespace chromeos_update_engine 110 } // namespace chromeos_update_engine
109 111
110 int main(int argc, char** argv) { 112 int main(int argc, char** argv) {
111 return chromeos_update_engine::Main(argc, argv); 113 return chromeos_update_engine::Main(argc, argv);
112 } 114 }
OLDNEW
« no previous file with comments | « delta_performer_unittest.cc ('k') | omaha_hash_calculator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698