From b18f153b12eedad79a609be96cce69d5b137f844 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 4 Sep 2019 18:10:16 -0700 Subject: Improve error messaging when bootcontrol HAL fails to load. Bug: N/A Test: manual test Change-Id: I6bf849dba4ae66353c44875ece30917283557327 --- boot_control/libboot_control.cpp | 10 ++++++++-- 1 file 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()); -- cgit v1.2.3