OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 // success. | 186 // success. |
187 static bool AssignTempBlocks( | 187 static bool AssignTempBlocks( |
188 Graph* graph, | 188 Graph* graph, |
189 const std::string& new_root, | 189 const std::string& new_root, |
190 int data_fd, | 190 int data_fd, |
191 off_t* data_file_size, | 191 off_t* data_file_size, |
192 std::vector<Vertex::Index>* op_indexes, | 192 std::vector<Vertex::Index>* op_indexes, |
193 std::vector<std::vector<Vertex::Index>::size_type>* reverse_op_indexes, | 193 std::vector<std::vector<Vertex::Index>::size_type>* reverse_op_indexes, |
194 std::vector<CutEdgeVertexes>& cuts); | 194 std::vector<CutEdgeVertexes>& cuts); |
195 | 195 |
| 196 // Given a new rootfs and kernel (|new_image|, |new_kernel_part|), |
| 197 // Reads them sequentially, creating a full update of chunk_size chunks. |
| 198 // Populates |graph|, |kernel_ops|, and |final_order|, with data |
| 199 // about the update operations, and writes relevant data to |fd|, |
| 200 // updating |data_file_size| as it does. |
| 201 static bool ReadFullUpdateFromDisk( |
| 202 Graph* graph, |
| 203 const std::string& new_kernel_part, |
| 204 const std::string& new_image, |
| 205 int fd, |
| 206 off_t* data_file_size, |
| 207 off_t chunk_size, |
| 208 std::vector<DeltaArchiveManifest_InstallOperation>* kernel_ops, |
| 209 std::vector<Vertex::Index>* final_order); |
| 210 |
196 private: | 211 private: |
197 // This should never be constructed | 212 // This should never be constructed |
198 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); | 213 DISALLOW_IMPLICIT_CONSTRUCTORS(DeltaDiffGenerator); |
199 }; | 214 }; |
200 | 215 |
201 extern const char* const kBsdiffPath; | 216 extern const char* const kBsdiffPath; |
202 extern const char* const kBspatchPath; | 217 extern const char* const kBspatchPath; |
203 extern const char* const kDeltaMagic; | 218 extern const char* const kDeltaMagic; |
204 | 219 |
205 }; // namespace chromeos_update_engine | 220 }; // namespace chromeos_update_engine |
206 | 221 |
207 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ | 222 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_DELTA_DIFF_GENERATOR_H__ |
OLD | NEW |