diff options
author | David Anderson <dvander@google.com> | 2019-08-30 00:09:22 +0200 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-09-05 03:12:36 +0200 |
commit | 46f38e461042d5f84baee32250fd15e56301a134 (patch) | |
tree | d30db11856481383f770399602a4b575227e07ec /boot_control/include | |
parent | Improve error messaging when bootcontrol HAL fails to load. (diff) | |
download | android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar.gz android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar.bz2 android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar.lz android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar.xz android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.tar.zst android_bootable_recovery-46f38e461042d5f84baee32250fd15e56301a134.zip |
Diffstat (limited to 'boot_control/include')
-rw-r--r-- | boot_control/include/libboot_control/libboot_control.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/boot_control/include/libboot_control/libboot_control.h b/boot_control/include/libboot_control/libboot_control.h index 6582d0244..34a9affe1 100644 --- a/boot_control/include/libboot_control/libboot_control.h +++ b/boot_control/include/libboot_control/libboot_control.h @@ -18,11 +18,15 @@ #include <string> +#include <android/hardware/boot/1.1/IBootControl.h> + namespace android { namespace bootable { // Helper library to implement the IBootControl HAL using the misc partition. class BootControl { + using MergeStatus = ::android::hardware::boot::V1_1::MergeStatus; + public: bool Init(); unsigned int GetNumberSlots(); @@ -34,6 +38,10 @@ class BootControl { bool IsSlotBootable(unsigned int slot); const char* GetSuffix(unsigned int slot); bool IsSlotMarkedSuccessful(unsigned int slot); + bool SetSnapshotMergeStatus(MergeStatus status); + MergeStatus GetSnapshotMergeStatus(); + + bool IsValidSlot(unsigned int slot); const std::string& misc_device() const { return misc_device_; |