summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-09-06 02:16:47 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-09-06 02:16:47 +0200
commit174ad50af91e33476643ef41cfbcf4de9cccdc1a (patch)
tree583546df819fb1734374f219be995e7ec4132072
parent[automerger skipped] Merge "DO NOT MERGE - Merge Android 10 into master" am: e0364db712 -s ours am: 8bb31dbab7 am: 42c411dbbc (diff)
parentMerge "boot_control: Don't allow current_slot_ to be -1." am: 9c0f102828 am: 0c34ef807b am: 185013413e (diff)
downloadandroid_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar.gz
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar.bz2
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar.lz
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar.xz
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.tar.zst
android_bootable_recovery-174ad50af91e33476643ef41cfbcf4de9cccdc1a.zip
Diffstat (limited to '')
-rw-r--r--boot_control/libboot_control.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp
index 8b44d5d1c..fa7dc47ef 100644
--- a/boot_control/libboot_control.cpp
+++ b/boot_control/libboot_control.cpp
@@ -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;