Merge "Improve error messaging when bootcontrol HAL fails to load." am: 4878f6a31c am: 1074b8a539 am: c0e2ac8e5d
am: 1f1f3b0a59

Change-Id: I242cb9479699ffe95a89f06f2075fd32a55ad7c6
diff --git a/boot_control/libboot_control.cpp b/boot_control/libboot_control.cpp
index fa7dc47..89cf878 100644
--- a/boot_control/libboot_control.cpp
+++ b/boot_control/libboot_control.cpp
@@ -204,10 +204,16 @@
 
   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());