diff options
| author | curiozuk <satyabrat.me@gmail.com> | 2016-11-23 14:33:30 +0000 |
|---|---|---|
| committer | Zhao Wei Liew <zhaoweiliew@gmail.com> | 2016-11-24 18:30:33 -0800 |
| commit | edcbd0931cc5e236a141b499add13c54489c2337 (patch) | |
| tree | a3b92c9918960252554c4ee7d7cb6a515237429a | |
| parent | f9192df888f81faf63798be5ee52bdd0222659ba (diff) | |
msm8916: init: Switch to c++ property_get
Change-Id: I966bd44579481b6b0c7c137e1120c553eacbb0a3
| -rw-r--r-- | init/init_msm8916.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/init/init_msm8916.cpp b/init/init_msm8916.cpp index 9a356ca..d9eba52 100644 --- a/init/init_msm8916.cpp +++ b/init/init_msm8916.cpp @@ -73,9 +73,7 @@ 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); + std::string tmp = property_get("ro.boot.alarmboot"); if (read_file2(alarm_file, buf, sizeof(buf))) { /* @@ -93,7 +91,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' || !strcmp(tmp, "true")) + if (buf[0] == '3' || tmp == "true") property_set("ro.alarm_boot", "true"); else property_set("ro.alarm_boot", "false"); |
