diff options
| author | curiozuk <satyabrat.me@gmail.com> | 2016-11-23 14:33:30 +0000 |
|---|---|---|
| committer | lolmaxlik <ilya.lebedev.2003@mail.ru> | 2016-12-02 13:37:17 +0600 |
| commit | d9336cba2a2dd1add8006f03a07218adb8bc8b2a (patch) | |
| tree | 6d98080abd62cc5e6b59d83f07e4fc5b3b50a6f3 | |
| parent | 9ae636398f56bd63a29e9236a4b4c88c80a9186b (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 a84ac02..b14fdf9 100644 --- a/init/init_msm8916.cpp +++ b/init/init_msm8916.cpp @@ -72,9 +72,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))) { /* @@ -92,7 +90,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"); |
