summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-09-10 03:06:04 +0200
committerandroid-build-merger <android-build-merger@google.com>2019-09-10 03:06:04 +0200
commit02012cc3e1075308cdc562b20cff61419b25059f (patch)
tree1571c2bab598c48de0a36e0b808ba5817b29127c
parent[automerger skipped] Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master am: b3b43be5d8 -s ours am: 4b1e751181 -s ours (diff)
parentMerge "Improve error messaging when bootcontrol HAL fails to load." am: 4878f6a31c am: 1074b8a539 (diff)
downloadandroid_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar.gz
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar.bz2
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar.lz
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar.xz
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.tar.zst
android_bootable_recovery-02012cc3e1075308cdc562b20cff61419b25059f.zip
-rw-r--r--boot_control/libboot_control.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp
index fa7dc47ef..89cf8786a 100644
--- a/boot_control/libboot_control.cpp
+++ b/boot_control/libboot_control.cpp
@@ -204,10 +204,16 @@ bool BootControl::Init() {
std::string err;
std::string device = get_bootloader_message_blk_device(&err);
- if (device.empty()) return false;
+ if (device.empty()) {
+ LOG(ERROR) << "Could not find bootloader message block device: " << err;
+ return false;
+ }
bootloader_control boot_ctrl;
- if (!LoadBootloaderControl(device.c_str(), &boot_ctrl)) return false;
+ if (!LoadBootloaderControl(device.c_str(), &boot_ctrl)) {
+ LOG(ERROR) << "Failed to load bootloader control block";
+ return false;
+ }
// Note that since there isn't a module unload function this memory is leaked.
misc_device_ = strdup(device.c_str());