diff options
author | Tabassum Tabassum <ttabassu@codeaurora.org> | 2021-04-23 16:10:41 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-05-18 09:56:43 -0700 |
commit | d7fda3e6d114c2216b81ab857625739b5a754aaa (patch) | |
tree | 66176a34130fb60e6e8c9a8896e24af69ddf7525 /1.1/libboot_control_qti/libboot_control_qti.cpp | |
parent | 4b6405a7f0b4d52e6266683ba49c3e83c5b16e32 (diff) |
Bootctrl: Supporting bootctrl on HQX.
Updating get_number_slots API, to return 2 slots on HQX.
Change-Id: Id5f611bc14a62b1458843a27e233d6972adf775e
Diffstat (limited to '1.1/libboot_control_qti/libboot_control_qti.cpp')
-rw-r--r-- | 1.1/libboot_control_qti/libboot_control_qti.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/1.1/libboot_control_qti/libboot_control_qti.cpp b/1.1/libboot_control_qti/libboot_control_qti.cpp index 1a36300..d0f3045 100644 --- a/1.1/libboot_control_qti/libboot_control_qti.cpp +++ b/1.1/libboot_control_qti/libboot_control_qti.cpp @@ -27,6 +27,8 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#define LOG_TAG "bootcontrolhal" + #include <libboot_control_qti.h> #include <map> @@ -34,7 +36,6 @@ #include <string> #include <vector> #include <errno.h> -#define LOG_TAG "bootcontrolhal" #include <cutils/log.h> #include <stdio.h> #include <string.h> @@ -52,6 +53,8 @@ #define BOOT_IMG_PTN_NAME "boot" #define LUN_NAME_END_LOC 14 #define BOOT_SLOT_PROP "ro.boot.slot_suffix" +#define BOARD_PLATFORM_PROP "ro.build.product" +#define GVMQ_PLATFORM "msmnile_gvmq" #define SLOT_ACTIVE 1 #define SLOT_INACTIVE 2 @@ -419,11 +422,18 @@ error: bool bootcontrol_init() { + char platform[256]; + property_get(BOARD_PLATFORM_PROP , platform, ""); + if (!strncmp(platform, GVMQ_PLATFORM, strlen(GVMQ_PLATFORM))) + mPlatform = true; return InitMiscVirtualAbMessageIfNeeded(); } unsigned get_number_slots() { + if(mPlatform) + return 2; + struct dirent *de = NULL; DIR *dir_bootdev = NULL; unsigned slot_count = 0; |