Merge "boot_control: Don't allow current_slot_ to be -1."

am: 9c0f102828

Change-Id: I28a50628ecdaf2a6f0ccf0e1a93cf9f70fa47ad0
This commit is contained in:
David Anderson 2019-09-05 16:41:07 -07:00 committed by android-build-merger
commit 0c34ef807b

View file

@ -196,6 +196,10 @@ bool BootControl::Init() {
// was not set (from either the command line or the device tree), we can later
// initialize it from the bootloader_control struct.
std::string suffix_prop = android::base::GetProperty("ro.boot.slot_suffix", "");
if (suffix_prop.empty()) {
LOG(ERROR) << "Slot suffix property is not set";
return false;
}
current_slot_ = SlotSuffixToIndex(suffix_prop.c_str());
std::string err;