aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorZhao Wei Liew <zhaoweiliew@gmail.com>2016-11-10 20:31:47 +0800
committerDavide Garberi <dade.garberi@gmail.com>2017-12-02 18:10:03 +0100
commit2f6ed763cbab1a7f4c5bda7836398ef6e5583089 (patch)
treebfd73ec98e456eedb521761da20c111de6088f40 /init
parentb86b53a2509d618d87f36c9d15ebf67005bd7bd3 (diff)
msm8996-common: init: Check reboot_reason when setting alarm_boot prop
This was missed out from init.qcom.early_boot.sh. Change-Id: Iab5b0d7782a53b97315d2aa9d0c301ed7725e01d Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'init')
-rw-r--r--init/init_msm8996.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/init/init_msm8996.cpp b/init/init_msm8996.cpp
index 4c23b67..11bf5e4 100644
--- a/init/init_msm8996.cpp
+++ b/init/init_msm8996.cpp
@@ -48,6 +48,7 @@ static void init_alarm_boot_properties()
{
char const *boot_reason_file = "/proc/sys/kernel/boot_reason";
std::string boot_reason;
+ std::string reboot_reason = property_get("ro.boot.alarmboot");
if (read_file(boot_reason_file, &boot_reason)) {
/*
@@ -65,7 +66,7 @@ static void init_alarm_boot_properties()
* 7 -> CBLPWR_N pin toggled (for external power supply)
* 8 -> KPDPWR_N pin toggled (power key pressed)
*/
- if (Trim(boot_reason) == "3") {
+ if (Trim(boot_reason) == "3" || reboot_reason == "true") {
property_set("ro.alarm_boot", "true");
} else {
property_set("ro.alarm_boot", "false");