diff options
-rw-r--r-- | 1.1/libboot_control_qti/libboot_control_qti.cpp | 12 | ||||
-rw-r--r-- | 1.1/libboot_control_qti/libboot_control_qti.h | 2 |
2 files changed, 13 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; diff --git a/1.1/libboot_control_qti/libboot_control_qti.h b/1.1/libboot_control_qti/libboot_control_qti.h index b055a49..2b1d18d 100644 --- a/1.1/libboot_control_qti/libboot_control_qti.h +++ b/1.1/libboot_control_qti/libboot_control_qti.h @@ -48,3 +48,5 @@ const char* get_suffix(unsigned slot); // IBootControl 1.1 methods bool set_snapshot_merge_status(MergeStatus status); MergeStatus get_snapshot_merge_status(); + +bool mPlatform = false; |