1*5a923131SAndroid Build Coastguard Worker //
2*5a923131SAndroid Build Coastguard Worker // Copyright (C) 2013 The Android Open Source Project
3*5a923131SAndroid Build Coastguard Worker //
4*5a923131SAndroid Build Coastguard Worker // Licensed under the Apache License, Version 2.0 (the "License");
5*5a923131SAndroid Build Coastguard Worker // you may not use this file except in compliance with the License.
6*5a923131SAndroid Build Coastguard Worker // You may obtain a copy of the License at
7*5a923131SAndroid Build Coastguard Worker //
8*5a923131SAndroid Build Coastguard Worker // http://www.apache.org/licenses/LICENSE-2.0
9*5a923131SAndroid Build Coastguard Worker //
10*5a923131SAndroid Build Coastguard Worker // Unless required by applicable law or agreed to in writing, software
11*5a923131SAndroid Build Coastguard Worker // distributed under the License is distributed on an "AS IS" BASIS,
12*5a923131SAndroid Build Coastguard Worker // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13*5a923131SAndroid Build Coastguard Worker // See the License for the specific language governing permissions and
14*5a923131SAndroid Build Coastguard Worker // limitations under the License.
15*5a923131SAndroid Build Coastguard Worker //
16*5a923131SAndroid Build Coastguard Worker
17*5a923131SAndroid Build Coastguard Worker #include "update_engine/payload_consumer/install_plan.h"
18*5a923131SAndroid Build Coastguard Worker
19*5a923131SAndroid Build Coastguard Worker #include <algorithm>
20*5a923131SAndroid Build Coastguard Worker #include <utility>
21*5a923131SAndroid Build Coastguard Worker
22*5a923131SAndroid Build Coastguard Worker #include <base/format_macros.h>
23*5a923131SAndroid Build Coastguard Worker #include <base/logging.h>
24*5a923131SAndroid Build Coastguard Worker #include <base/strings/string_number_conversions.h>
25*5a923131SAndroid Build Coastguard Worker #include <android-base/stringprintf.h>
26*5a923131SAndroid Build Coastguard Worker
27*5a923131SAndroid Build Coastguard Worker #include "update_engine/common/utils.h"
28*5a923131SAndroid Build Coastguard Worker #include "update_engine/update_metadata.pb.h"
29*5a923131SAndroid Build Coastguard Worker
30*5a923131SAndroid Build Coastguard Worker using std::string;
31*5a923131SAndroid Build Coastguard Worker using std::vector;
32*5a923131SAndroid Build Coastguard Worker
33*5a923131SAndroid Build Coastguard Worker namespace chromeos_update_engine {
34*5a923131SAndroid Build Coastguard Worker
35*5a923131SAndroid Build Coastguard Worker namespace {
PayloadUrlsToString(const decltype(InstallPlan::Payload::payload_urls) & payload_urls)36*5a923131SAndroid Build Coastguard Worker string PayloadUrlsToString(
37*5a923131SAndroid Build Coastguard Worker const decltype(InstallPlan::Payload::payload_urls)& payload_urls) {
38*5a923131SAndroid Build Coastguard Worker return "(" + android::base::Join(payload_urls, ",") + ")";
39*5a923131SAndroid Build Coastguard Worker }
40*5a923131SAndroid Build Coastguard Worker
VectorToString(const vector<std::pair<string,string>> & input,const string & separator)41*5a923131SAndroid Build Coastguard Worker string VectorToString(const vector<std::pair<string, string>>& input,
42*5a923131SAndroid Build Coastguard Worker const string& separator) {
43*5a923131SAndroid Build Coastguard Worker vector<string> vec;
44*5a923131SAndroid Build Coastguard Worker std::transform(input.begin(),
45*5a923131SAndroid Build Coastguard Worker input.end(),
46*5a923131SAndroid Build Coastguard Worker std::back_inserter(vec),
47*5a923131SAndroid Build Coastguard Worker [](const auto& pair) {
48*5a923131SAndroid Build Coastguard Worker return android::base::Join(vector{pair.first, pair.second},
49*5a923131SAndroid Build Coastguard Worker ": ");
50*5a923131SAndroid Build Coastguard Worker });
51*5a923131SAndroid Build Coastguard Worker return android::base::Join(vec, separator);
52*5a923131SAndroid Build Coastguard Worker }
53*5a923131SAndroid Build Coastguard Worker } // namespace
54*5a923131SAndroid Build Coastguard Worker
InstallPayloadTypeToString(InstallPayloadType type)55*5a923131SAndroid Build Coastguard Worker string InstallPayloadTypeToString(InstallPayloadType type) {
56*5a923131SAndroid Build Coastguard Worker switch (type) {
57*5a923131SAndroid Build Coastguard Worker case InstallPayloadType::kUnknown:
58*5a923131SAndroid Build Coastguard Worker return "unknown";
59*5a923131SAndroid Build Coastguard Worker case InstallPayloadType::kFull:
60*5a923131SAndroid Build Coastguard Worker return "full";
61*5a923131SAndroid Build Coastguard Worker case InstallPayloadType::kDelta:
62*5a923131SAndroid Build Coastguard Worker return "delta";
63*5a923131SAndroid Build Coastguard Worker }
64*5a923131SAndroid Build Coastguard Worker return "invalid type";
65*5a923131SAndroid Build Coastguard Worker }
66*5a923131SAndroid Build Coastguard Worker
operator ==(const InstallPlan & that) const67*5a923131SAndroid Build Coastguard Worker bool InstallPlan::operator==(const InstallPlan& that) const {
68*5a923131SAndroid Build Coastguard Worker return ((is_resume == that.is_resume) &&
69*5a923131SAndroid Build Coastguard Worker (download_url == that.download_url) && (payloads == that.payloads) &&
70*5a923131SAndroid Build Coastguard Worker (source_slot == that.source_slot) &&
71*5a923131SAndroid Build Coastguard Worker (target_slot == that.target_slot) && (partitions == that.partitions));
72*5a923131SAndroid Build Coastguard Worker }
73*5a923131SAndroid Build Coastguard Worker
operator !=(const InstallPlan & that) const74*5a923131SAndroid Build Coastguard Worker bool InstallPlan::operator!=(const InstallPlan& that) const {
75*5a923131SAndroid Build Coastguard Worker return !((*this) == that);
76*5a923131SAndroid Build Coastguard Worker }
77*5a923131SAndroid Build Coastguard Worker
Dump() const78*5a923131SAndroid Build Coastguard Worker void InstallPlan::Dump() const {
79*5a923131SAndroid Build Coastguard Worker LOG(INFO) << "InstallPlan: \n" << ToString();
80*5a923131SAndroid Build Coastguard Worker }
81*5a923131SAndroid Build Coastguard Worker
ToString() const82*5a923131SAndroid Build Coastguard Worker string InstallPlan::ToString() const {
83*5a923131SAndroid Build Coastguard Worker string url_str = download_url;
84*5a923131SAndroid Build Coastguard Worker if (android::base::StartsWith(ToLower(url_str), "fd://")) {
85*5a923131SAndroid Build Coastguard Worker int fd = std::stoi(url_str.substr(strlen("fd://")));
86*5a923131SAndroid Build Coastguard Worker url_str = utils::GetFilePath(fd);
87*5a923131SAndroid Build Coastguard Worker }
88*5a923131SAndroid Build Coastguard Worker
89*5a923131SAndroid Build Coastguard Worker vector<string> result_str;
90*5a923131SAndroid Build Coastguard Worker result_str.emplace_back(VectorToString(
91*5a923131SAndroid Build Coastguard Worker {
92*5a923131SAndroid Build Coastguard Worker {"type", (is_resume ? "resume" : "new_update")},
93*5a923131SAndroid Build Coastguard Worker {"version", version},
94*5a923131SAndroid Build Coastguard Worker {"source_slot", BootControlInterface::SlotName(source_slot)},
95*5a923131SAndroid Build Coastguard Worker {"target_slot", BootControlInterface::SlotName(target_slot)},
96*5a923131SAndroid Build Coastguard Worker {"initial url", url_str},
97*5a923131SAndroid Build Coastguard Worker {"hash_checks_mandatory", utils::ToString(hash_checks_mandatory)},
98*5a923131SAndroid Build Coastguard Worker {"powerwash_required", utils::ToString(powerwash_required)},
99*5a923131SAndroid Build Coastguard Worker {"switch_slot_on_reboot", utils::ToString(switch_slot_on_reboot)},
100*5a923131SAndroid Build Coastguard Worker {"run_post_install", utils::ToString(run_post_install)},
101*5a923131SAndroid Build Coastguard Worker {"write_verity", utils::ToString(write_verity)},
102*5a923131SAndroid Build Coastguard Worker },
103*5a923131SAndroid Build Coastguard Worker "\n"));
104*5a923131SAndroid Build Coastguard Worker
105*5a923131SAndroid Build Coastguard Worker for (const auto& partition : partitions) {
106*5a923131SAndroid Build Coastguard Worker result_str.emplace_back(VectorToString(
107*5a923131SAndroid Build Coastguard Worker {
108*5a923131SAndroid Build Coastguard Worker {"Partition", partition.name},
109*5a923131SAndroid Build Coastguard Worker {"source_size", std::format("{}", partition.source_size)},
110*5a923131SAndroid Build Coastguard Worker {"source_path", partition.source_path},
111*5a923131SAndroid Build Coastguard Worker {"source_hash",
112*5a923131SAndroid Build Coastguard Worker base::HexEncode(partition.source_hash.data(),
113*5a923131SAndroid Build Coastguard Worker partition.source_hash.size())},
114*5a923131SAndroid Build Coastguard Worker {"target_size", std::format("{}", partition.target_size)},
115*5a923131SAndroid Build Coastguard Worker {"target_path", partition.target_path},
116*5a923131SAndroid Build Coastguard Worker {"target_hash",
117*5a923131SAndroid Build Coastguard Worker base::HexEncode(partition.target_hash.data(),
118*5a923131SAndroid Build Coastguard Worker partition.target_hash.size())},
119*5a923131SAndroid Build Coastguard Worker {"run_postinstall", utils::ToString(partition.run_postinstall)},
120*5a923131SAndroid Build Coastguard Worker {"postinstall_path", partition.postinstall_path},
121*5a923131SAndroid Build Coastguard Worker {"readonly_target_path", partition.readonly_target_path},
122*5a923131SAndroid Build Coastguard Worker {"filesystem_type", partition.filesystem_type},
123*5a923131SAndroid Build Coastguard Worker },
124*5a923131SAndroid Build Coastguard Worker "\n "));
125*5a923131SAndroid Build Coastguard Worker }
126*5a923131SAndroid Build Coastguard Worker
127*5a923131SAndroid Build Coastguard Worker for (unsigned int i = 0; i < payloads.size(); ++i) {
128*5a923131SAndroid Build Coastguard Worker const auto& payload = payloads[i];
129*5a923131SAndroid Build Coastguard Worker result_str.emplace_back(VectorToString(
130*5a923131SAndroid Build Coastguard Worker {
131*5a923131SAndroid Build Coastguard Worker {"Payload", std::format("{}", i)},
132*5a923131SAndroid Build Coastguard Worker {"urls", PayloadUrlsToString(payload.payload_urls)},
133*5a923131SAndroid Build Coastguard Worker {"size", std::format("{}", payload.size)},
134*5a923131SAndroid Build Coastguard Worker {"metadata_size", std::format("{}", payload.metadata_size)},
135*5a923131SAndroid Build Coastguard Worker {"metadata_signature", payload.metadata_signature},
136*5a923131SAndroid Build Coastguard Worker {"hash", base::HexEncode(payload.hash.data(), payload.hash.size())},
137*5a923131SAndroid Build Coastguard Worker {"type", InstallPayloadTypeToString(payload.type)},
138*5a923131SAndroid Build Coastguard Worker {"fingerprint", payload.fp},
139*5a923131SAndroid Build Coastguard Worker {"app_id", payload.app_id},
140*5a923131SAndroid Build Coastguard Worker {"already_applied", utils::ToString(payload.already_applied)},
141*5a923131SAndroid Build Coastguard Worker },
142*5a923131SAndroid Build Coastguard Worker "\n "));
143*5a923131SAndroid Build Coastguard Worker }
144*5a923131SAndroid Build Coastguard Worker
145*5a923131SAndroid Build Coastguard Worker return android::base::Join(result_str, "\n");
146*5a923131SAndroid Build Coastguard Worker }
147*5a923131SAndroid Build Coastguard Worker
LoadPartitionsFromSlots(BootControlInterface * boot_control)148*5a923131SAndroid Build Coastguard Worker bool InstallPlan::LoadPartitionsFromSlots(BootControlInterface* boot_control) {
149*5a923131SAndroid Build Coastguard Worker bool result = true;
150*5a923131SAndroid Build Coastguard Worker for (Partition& partition : partitions) {
151*5a923131SAndroid Build Coastguard Worker if (source_slot != BootControlInterface::kInvalidSlot &&
152*5a923131SAndroid Build Coastguard Worker partition.source_size > 0) {
153*5a923131SAndroid Build Coastguard Worker TEST_AND_RETURN_FALSE(boot_control->GetPartitionDevice(
154*5a923131SAndroid Build Coastguard Worker partition.name, source_slot, &partition.source_path));
155*5a923131SAndroid Build Coastguard Worker } else {
156*5a923131SAndroid Build Coastguard Worker partition.source_path.clear();
157*5a923131SAndroid Build Coastguard Worker }
158*5a923131SAndroid Build Coastguard Worker
159*5a923131SAndroid Build Coastguard Worker if (target_slot != BootControlInterface::kInvalidSlot &&
160*5a923131SAndroid Build Coastguard Worker partition.target_size > 0) {
161*5a923131SAndroid Build Coastguard Worker auto device = boot_control->GetPartitionDevice(
162*5a923131SAndroid Build Coastguard Worker partition.name, target_slot, source_slot);
163*5a923131SAndroid Build Coastguard Worker TEST_AND_RETURN_FALSE(device.has_value());
164*5a923131SAndroid Build Coastguard Worker partition.target_path = device->rw_device_path;
165*5a923131SAndroid Build Coastguard Worker partition.readonly_target_path = device->readonly_device_path;
166*5a923131SAndroid Build Coastguard Worker } else {
167*5a923131SAndroid Build Coastguard Worker partition.target_path.clear();
168*5a923131SAndroid Build Coastguard Worker }
169*5a923131SAndroid Build Coastguard Worker }
170*5a923131SAndroid Build Coastguard Worker return result;
171*5a923131SAndroid Build Coastguard Worker }
172*5a923131SAndroid Build Coastguard Worker
operator ==(const InstallPlan::Partition & that) const173*5a923131SAndroid Build Coastguard Worker bool InstallPlan::Partition::operator==(
174*5a923131SAndroid Build Coastguard Worker const InstallPlan::Partition& that) const {
175*5a923131SAndroid Build Coastguard Worker return (name == that.name && source_path == that.source_path &&
176*5a923131SAndroid Build Coastguard Worker source_size == that.source_size && source_hash == that.source_hash &&
177*5a923131SAndroid Build Coastguard Worker target_path == that.target_path && target_size == that.target_size &&
178*5a923131SAndroid Build Coastguard Worker target_hash == that.target_hash &&
179*5a923131SAndroid Build Coastguard Worker run_postinstall == that.run_postinstall &&
180*5a923131SAndroid Build Coastguard Worker postinstall_path == that.postinstall_path &&
181*5a923131SAndroid Build Coastguard Worker filesystem_type == that.filesystem_type &&
182*5a923131SAndroid Build Coastguard Worker postinstall_optional == that.postinstall_optional);
183*5a923131SAndroid Build Coastguard Worker }
184*5a923131SAndroid Build Coastguard Worker
ParseVerityConfig(const PartitionUpdate & partition)185*5a923131SAndroid Build Coastguard Worker bool InstallPlan::Partition::ParseVerityConfig(
186*5a923131SAndroid Build Coastguard Worker const PartitionUpdate& partition) {
187*5a923131SAndroid Build Coastguard Worker if (partition.has_hash_tree_extent()) {
188*5a923131SAndroid Build Coastguard Worker Extent extent = partition.hash_tree_data_extent();
189*5a923131SAndroid Build Coastguard Worker hash_tree_data_offset = extent.start_block() * block_size;
190*5a923131SAndroid Build Coastguard Worker hash_tree_data_size = extent.num_blocks() * block_size;
191*5a923131SAndroid Build Coastguard Worker extent = partition.hash_tree_extent();
192*5a923131SAndroid Build Coastguard Worker hash_tree_offset = extent.start_block() * block_size;
193*5a923131SAndroid Build Coastguard Worker hash_tree_size = extent.num_blocks() * block_size;
194*5a923131SAndroid Build Coastguard Worker uint64_t hash_tree_data_end = hash_tree_data_offset + hash_tree_data_size;
195*5a923131SAndroid Build Coastguard Worker if (hash_tree_offset < hash_tree_data_end) {
196*5a923131SAndroid Build Coastguard Worker LOG(ERROR) << "Invalid hash tree extents, hash tree data ends at "
197*5a923131SAndroid Build Coastguard Worker << hash_tree_data_end << ", but hash tree starts at "
198*5a923131SAndroid Build Coastguard Worker << hash_tree_offset;
199*5a923131SAndroid Build Coastguard Worker return false;
200*5a923131SAndroid Build Coastguard Worker }
201*5a923131SAndroid Build Coastguard Worker hash_tree_algorithm = partition.hash_tree_algorithm();
202*5a923131SAndroid Build Coastguard Worker hash_tree_salt.assign(partition.hash_tree_salt().begin(),
203*5a923131SAndroid Build Coastguard Worker partition.hash_tree_salt().end());
204*5a923131SAndroid Build Coastguard Worker }
205*5a923131SAndroid Build Coastguard Worker if (partition.has_fec_extent()) {
206*5a923131SAndroid Build Coastguard Worker Extent extent = partition.fec_data_extent();
207*5a923131SAndroid Build Coastguard Worker fec_data_offset = extent.start_block() * block_size;
208*5a923131SAndroid Build Coastguard Worker fec_data_size = extent.num_blocks() * block_size;
209*5a923131SAndroid Build Coastguard Worker extent = partition.fec_extent();
210*5a923131SAndroid Build Coastguard Worker fec_offset = extent.start_block() * block_size;
211*5a923131SAndroid Build Coastguard Worker fec_size = extent.num_blocks() * block_size;
212*5a923131SAndroid Build Coastguard Worker uint64_t fec_data_end = fec_data_offset + fec_data_size;
213*5a923131SAndroid Build Coastguard Worker if (fec_offset < fec_data_end) {
214*5a923131SAndroid Build Coastguard Worker LOG(ERROR) << "Invalid fec extents, fec data ends at " << fec_data_end
215*5a923131SAndroid Build Coastguard Worker << ", but fec starts at " << fec_offset;
216*5a923131SAndroid Build Coastguard Worker return false;
217*5a923131SAndroid Build Coastguard Worker }
218*5a923131SAndroid Build Coastguard Worker fec_roots = partition.fec_roots();
219*5a923131SAndroid Build Coastguard Worker }
220*5a923131SAndroid Build Coastguard Worker return true;
221*5a923131SAndroid Build Coastguard Worker }
222*5a923131SAndroid Build Coastguard Worker
223*5a923131SAndroid Build Coastguard Worker template <typename PartitinoUpdateArray>
ParseManifestToInstallPlan(const PartitinoUpdateArray & partitions,BootControlInterface * boot_control,size_t block_size,InstallPlan * install_plan,ErrorCode * error)224*5a923131SAndroid Build Coastguard Worker bool InstallPlan::ParseManifestToInstallPlan(
225*5a923131SAndroid Build Coastguard Worker const PartitinoUpdateArray& partitions,
226*5a923131SAndroid Build Coastguard Worker BootControlInterface* boot_control,
227*5a923131SAndroid Build Coastguard Worker size_t block_size,
228*5a923131SAndroid Build Coastguard Worker InstallPlan* install_plan,
229*5a923131SAndroid Build Coastguard Worker ErrorCode* error) {
230*5a923131SAndroid Build Coastguard Worker // Fill in the InstallPlan::partitions based on the partitions from the
231*5a923131SAndroid Build Coastguard Worker // payload.
232*5a923131SAndroid Build Coastguard Worker for (const PartitionUpdate& partition : partitions) {
233*5a923131SAndroid Build Coastguard Worker InstallPlan::Partition install_part;
234*5a923131SAndroid Build Coastguard Worker install_part.name = partition.partition_name();
235*5a923131SAndroid Build Coastguard Worker install_part.run_postinstall =
236*5a923131SAndroid Build Coastguard Worker partition.has_run_postinstall() && partition.run_postinstall();
237*5a923131SAndroid Build Coastguard Worker if (install_part.run_postinstall) {
238*5a923131SAndroid Build Coastguard Worker install_part.postinstall_path =
239*5a923131SAndroid Build Coastguard Worker (partition.has_postinstall_path() ? partition.postinstall_path()
240*5a923131SAndroid Build Coastguard Worker : kPostinstallDefaultScript);
241*5a923131SAndroid Build Coastguard Worker install_part.filesystem_type = partition.filesystem_type();
242*5a923131SAndroid Build Coastguard Worker install_part.postinstall_optional = partition.postinstall_optional();
243*5a923131SAndroid Build Coastguard Worker }
244*5a923131SAndroid Build Coastguard Worker
245*5a923131SAndroid Build Coastguard Worker if (partition.has_old_partition_info()) {
246*5a923131SAndroid Build Coastguard Worker const PartitionInfo& info = partition.old_partition_info();
247*5a923131SAndroid Build Coastguard Worker install_part.source_size = info.size();
248*5a923131SAndroid Build Coastguard Worker install_part.source_hash.assign(info.hash().begin(), info.hash().end());
249*5a923131SAndroid Build Coastguard Worker }
250*5a923131SAndroid Build Coastguard Worker
251*5a923131SAndroid Build Coastguard Worker if (!partition.has_new_partition_info()) {
252*5a923131SAndroid Build Coastguard Worker LOG(ERROR) << "Unable to get new partition hash info on partition "
253*5a923131SAndroid Build Coastguard Worker << install_part.name << ".";
254*5a923131SAndroid Build Coastguard Worker *error = ErrorCode::kDownloadNewPartitionInfoError;
255*5a923131SAndroid Build Coastguard Worker return false;
256*5a923131SAndroid Build Coastguard Worker }
257*5a923131SAndroid Build Coastguard Worker const PartitionInfo& info = partition.new_partition_info();
258*5a923131SAndroid Build Coastguard Worker install_part.target_size = info.size();
259*5a923131SAndroid Build Coastguard Worker install_part.target_hash.assign(info.hash().begin(), info.hash().end());
260*5a923131SAndroid Build Coastguard Worker
261*5a923131SAndroid Build Coastguard Worker install_part.block_size = block_size;
262*5a923131SAndroid Build Coastguard Worker if (!install_part.ParseVerityConfig(partition)) {
263*5a923131SAndroid Build Coastguard Worker *error = ErrorCode::kDownloadNewPartitionInfoError;
264*5a923131SAndroid Build Coastguard Worker LOG(INFO) << "Failed to parse partition `" << partition.partition_name()
265*5a923131SAndroid Build Coastguard Worker << "` verity configs";
266*5a923131SAndroid Build Coastguard Worker return false;
267*5a923131SAndroid Build Coastguard Worker }
268*5a923131SAndroid Build Coastguard Worker
269*5a923131SAndroid Build Coastguard Worker install_plan->partitions.push_back(install_part);
270*5a923131SAndroid Build Coastguard Worker }
271*5a923131SAndroid Build Coastguard Worker
272*5a923131SAndroid Build Coastguard Worker // TODO(xunchang) only need to load the partitions for those in payload.
273*5a923131SAndroid Build Coastguard Worker // Because we have already loaded the other once when generating SOURCE_COPY
274*5a923131SAndroid Build Coastguard Worker // operations.
275*5a923131SAndroid Build Coastguard Worker if (!install_plan->LoadPartitionsFromSlots(boot_control)) {
276*5a923131SAndroid Build Coastguard Worker LOG(ERROR) << "Unable to determine all the partition devices.";
277*5a923131SAndroid Build Coastguard Worker *error = ErrorCode::kInstallDeviceOpenError;
278*5a923131SAndroid Build Coastguard Worker return false;
279*5a923131SAndroid Build Coastguard Worker }
280*5a923131SAndroid Build Coastguard Worker return true;
281*5a923131SAndroid Build Coastguard Worker }
282*5a923131SAndroid Build Coastguard Worker
ParsePartitions(const std::vector<PartitionUpdate> & partitions,BootControlInterface * boot_control,size_t block_size,ErrorCode * error)283*5a923131SAndroid Build Coastguard Worker bool InstallPlan::ParsePartitions(
284*5a923131SAndroid Build Coastguard Worker const std::vector<PartitionUpdate>& partitions,
285*5a923131SAndroid Build Coastguard Worker BootControlInterface* boot_control,
286*5a923131SAndroid Build Coastguard Worker size_t block_size,
287*5a923131SAndroid Build Coastguard Worker ErrorCode* error) {
288*5a923131SAndroid Build Coastguard Worker return ParseManifestToInstallPlan(
289*5a923131SAndroid Build Coastguard Worker partitions, boot_control, block_size, this, error);
290*5a923131SAndroid Build Coastguard Worker }
291*5a923131SAndroid Build Coastguard Worker
ParsePartitions(const google::protobuf::RepeatedPtrField<PartitionUpdate> & partitions,BootControlInterface * boot_control,size_t block_size,ErrorCode * error)292*5a923131SAndroid Build Coastguard Worker bool InstallPlan::ParsePartitions(
293*5a923131SAndroid Build Coastguard Worker const google::protobuf::RepeatedPtrField<PartitionUpdate>& partitions,
294*5a923131SAndroid Build Coastguard Worker BootControlInterface* boot_control,
295*5a923131SAndroid Build Coastguard Worker size_t block_size,
296*5a923131SAndroid Build Coastguard Worker ErrorCode* error) {
297*5a923131SAndroid Build Coastguard Worker return ParseManifestToInstallPlan(
298*5a923131SAndroid Build Coastguard Worker partitions, boot_control, block_size, this, error);
299*5a923131SAndroid Build Coastguard Worker }
300*5a923131SAndroid Build Coastguard Worker
301*5a923131SAndroid Build Coastguard Worker } // namespace chromeos_update_engine
302