Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0e2ac8e authored by David Anderson's avatar David Anderson Committed by android-build-merger
Browse files

Merge "Improve error messaging when bootcontrol HAL fails to load." am: 4878f6a3

am: 1074b8a5

Change-Id: I6438198585e750b796d4cbc5c0e05940cbd90e40
parents 4b1e7511 1074b8a5
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -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());