summaryrefslogtreecommitdiff
path: root/1.1/libboot_control_qti/libboot_control_qti.cpp
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2021-06-08 02:20:31 -0700
committerLinux Build Service Account <lnxbuild@localhost>2021-06-08 02:20:31 -0700
commitd6cb5758c853a1ab126001b55f048b9bdd959e08 (patch)
tree666cd628c33ddfbb625b73ca4dbf0b8ab3946e48 /1.1/libboot_control_qti/libboot_control_qti.cpp
parent46e9cfc7505bb3a279e028fa6a703a1f3f75e452 (diff)
parent6cb2be4a02805ed2acf5695369ca4d355abb5a48 (diff)
Merge 6cb2be4a02805ed2acf5695369ca4d355abb5a48 on remote branch
Change-Id: I23db34a6e6bfc74878dfcd6bce8ee7c9cf4a12ac
Diffstat (limited to '1.1/libboot_control_qti/libboot_control_qti.cpp')
-rw-r--r--1.1/libboot_control_qti/libboot_control_qti.cpp12
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 f476e95..d6f5d8b 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;