Commit Graph

3 Commits

Author SHA1 Message Date
David Anderson
b18f153b12 Improve error messaging when bootcontrol HAL fails to load.
Bug: N/A
Test: manual test
Change-Id: I6bf849dba4ae66353c44875ece30917283557327
2019-09-04 18:12:35 -07:00
David Anderson
643ddd99df boot_control: Don't allow current_slot_ to be -1.
If the HAL is run on a non-A/B device, it does not fail gracefully; it
will segfault because the current_slot is -1 and methods do not protect
against this. Instead, have Init() fail if we can't determine the
current slot.

Bug: 130078382
Test: vts tests
Change-Id: I2d3094518a842b1a764427d2da9d46781a9f26da
2019-09-04 18:12:23 -07:00
David Anderson
8108e2513f Refactor boot_control into a separate library.
This extracts the implementation of boot_control into a new library,
libboot_control. The bootctrl.default module now wraps this library.
This refactoring will allow us to re-use the same implementation in
HIDL.

Bug: 138861550
Test: mm bootctrl.default
Change-Id: Ic0558da3c2d8e6f5ebec63a497825c24b51623b7
2019-08-30 10:20:59 -07:00