From 46f38e461042d5f84baee32250fd15e56301a134 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Aug 2019 15:09:22 -0700 Subject: Add IBootControl 1.1 support to libboot_control. Bug: 138861550 Test: vts Change-Id: Id4a2963d6ab657d8ab076b7013492a691462b287 --- boot_control/include/libboot_control/libboot_control.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'boot_control/include/libboot_control/libboot_control.h') 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 +#include + 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_; -- cgit v1.2.3