OLD | NEW |
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 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 // if insufficient scratch is found, the file is reread and will be | 185 // if insufficient scratch is found, the file is reread and will be |
186 // send down (either as REPLACE or REPLACE_BZ). Returns true on | 186 // send down (either as REPLACE or REPLACE_BZ). Returns true on |
187 // success. | 187 // success. |
188 static bool AssignTempBlocks( | 188 static bool AssignTempBlocks( |
189 Graph* graph, | 189 Graph* graph, |
190 const std::string& new_root, | 190 const std::string& new_root, |
191 int data_fd, | 191 int data_fd, |
192 off_t* data_file_size, | 192 off_t* data_file_size, |
193 std::vector<Vertex::Index>* op_indexes, | 193 std::vector<Vertex::Index>* op_indexes, |
194 std::vector<std::vector<Vertex::Index>::size_type>* reverse_op_indexes, | 194 std::vector<std::vector<Vertex::Index>::size_type>* reverse_op_indexes, |
195 std::vector<CutEdgeVertexes>& cuts); | 195 const std::vector<CutEdgeVertexes>& cuts); |
196 | 196 |
197 // Given a new rootfs and kernel (|new_image|, |new_kernel_part|), Reads them | 197 // Given a new rootfs and kernel (|new_image|, |new_kernel_part|), Reads them |
198 // sequentially, creating a full update of chunk_size chunks. Populates | 198 // sequentially, creating a full update of chunk_size chunks. Populates |
199 // |graph|, |kernel_ops|, and |final_order|, with data about the update | 199 // |graph|, |kernel_ops|, and |final_order|, with data about the update |
200 // operations, and writes relevant data to |fd|, updating |data_file_size| as | 200 // operations, and writes relevant data to |fd|, updating |data_file_size| as |
201 // it does. Only the first |image_size| bytes are read from |new_image| | 201 // it does. Only the first |image_size| bytes are read from |new_image| |
202 // assuming that this is the actual file system. | 202 // assuming that this is the actual file system. |
203 static bool ReadFullUpdateFromDisk( | 203 static bool ReadFullUpdateFromDisk( |
204 Graph* graph, | 204 Graph* graph, |
205 const std::string& new_kernel_part, | 205 const std::string& new_kernel_part, |
(...skipping 18 matching lines...) Expand all Loading... |
224 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); | 224 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); |
225 }; | 225 }; |
226 | 226 |
227 extern const char* const kBsdiffPath; | 227 extern const char* const kBsdiffPath; |
228 extern const char* const kBspatchPath; | 228 extern const char* const kBspatchPath; |
229 extern const char* const kDeltaMagic; | 229 extern const char* const kDeltaMagic; |
230 | 230 |
231 }; // namespace chromeos_update_engine | 231 }; // namespace chromeos_update_engine |
232 | 232 |
233 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ | 233 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ |
OLD | NEW |