diff options
| author | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-11-10 20:31:47 +0800 |
|---|---|---|
| committer | lolmaxlik <ilya.lebedev.2003@mail.ru> | 2016-12-02 13:36:43 +0600 |
| commit | a5416259f0e336482e316d375f82a567586fa809 (patch) | |
| tree | 2c86c2deca7c325f7b82308fbcc8dd10b619ace7 | |
| parent | f11509acb44802bc9fdc614dfa1a7889ef2395a8 (diff) | |
msm8916: init: Check boot reason prop when setting alarm_boot prop
This is missed out from init.qcom.early_boot.sh.
Change-Id: Iab5b0d7782a53b97315d2aa9d0c301ed7725e01d
(cherry picked from commit 013cd47bc8eb1c2c245c606d4990e33ff3a170fd)
| -rw-r--r-- | init/init_msm8916.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/init/init_msm8916.cpp b/init/init_msm8916.cpp index c804647..a84ac02 100644 --- a/init/init_msm8916.cpp +++ b/init/init_msm8916.cpp @@ -72,6 +72,9 @@ static void init_alarm_boot_properties() { char const *alarm_file = "/proc/sys/kernel/boot_reason"; char buf[64]; + char tmp[PROP_VALUE_MAX]; + + property_get("ro.boot.alarmboot", tmp); if (read_file2(alarm_file, buf, sizeof(buf))) { /* @@ -89,7 +92,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 (buf[0] == '3') + if (buf[0] == '3' || !strcmp(tmp, "true")) property_set("ro.alarm_boot", "true"); else property_set("ro.alarm_boot", "false"); |
