summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-09-10 02:09:07 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-09-10 02:09:07 +0200
commit4878f6a31c4b1a653322d48ca1f4de61fa8a9278 (patch)
treef1fa2093391b32943f7b8127edee889d60d0f916
parentMerge "Remove reference to libhwbinder_noltopgo." (diff)
parentImprove error messaging when bootcontrol HAL fails to load. (diff)
downloadandroid_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar.gz
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar.bz2
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar.lz
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar.xz
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.tar.zst
android_bootable_recovery-4878f6a31c4b1a653322d48ca1f4de61fa8a9278.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());