Changing FlashTask to take in apply_vbmeta
Test: tested on Raven
Change-Id: I709842d87aa4ad6a7772e4f441886d127c3028a7
diff --git a/fastboot/task.cpp b/fastboot/task.cpp
index c70139b..44008e5 100644
--- a/fastboot/task.cpp
+++ b/fastboot/task.cpp
@@ -21,12 +21,13 @@
using namespace std::string_literals;
-FlashTask::FlashTask(const std::string& slot, const std::string& pname)
- : pname_(pname), fname_(find_item(pname)), slot_(slot) {
+FlashTask::FlashTask(const std::string& slot, const std::string& pname, const bool apply_vbmeta)
+ : pname_(pname), fname_(find_item(pname)), slot_(slot), apply_vbmeta_(apply_vbmeta) {
if (fname_.empty()) die("cannot determine image filename for '%s'", pname_.c_str());
}
-FlashTask::FlashTask(const std::string& _slot, const std::string& _pname, const std::string& _fname)
- : pname_(_pname), fname_(_fname), slot_(_slot) {}
+FlashTask::FlashTask(const std::string& _slot, const std::string& _pname, const std::string& _fname,
+ const bool apply_vbmeta)
+ : pname_(_pname), fname_(_fname), slot_(_slot), apply_vbmeta_(apply_vbmeta) {}
void FlashTask::Run() {
auto flash = [&](const std::string& partition) {
@@ -39,7 +40,7 @@
"And try again. If you are intentionally trying to "
"overwrite a fixed partition, use --force.");
}
- do_flash(partition.c_str(), fname_.c_str());
+ do_flash(partition.c_str(), fname_.c_str(), apply_vbmeta_);
};
do_for_partitions(pname_, slot_, flash, true);
}