diff options
| author | OzzysCmAcc <oskarkratochvil86@yahoo.com> | 2016-08-27 12:53:58 +0200 |
|---|---|---|
| committer | Kevin F. Haggerty <kevin.f.haggerty@gmail.com> | 2016-10-14 14:20:30 -0600 |
| commit | dd0b96de408405f2f907c27248e8027b6c54f4f4 (patch) | |
| tree | 2428a733690bc8fa0d2984324677ecd7eaa0255f | |
| parent | e935d9cd81eb0be0c83be622551d13ecbf9b0c75 (diff) | |
kltekdi: update init code to cpp
Change-Id: I10d5c6cd57708e54e4965e055a6cfb07bc404013
| -rwxr-xr-x | init/init_klte.cpp | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/init/init_klte.cpp b/init/init_klte.cpp index 9839688..c74750c 100755 --- a/init/init_klte.cpp +++ b/init/init_klte.cpp @@ -37,8 +37,6 @@ #include "init_msm8974.h" -#define ISMATCH(a, b) (!strncmp((a), (b), PROP_VALUE_MAX)) - void cdma_properties(char const *default_cdma_sub, char const *operator_numeric, char const *operator_alpha) { @@ -53,27 +51,20 @@ void cdma_properties(char const *default_cdma_sub, void init_target_properties() { - char platform[PROP_VALUE_MAX]; - char bootloader[PROP_VALUE_MAX]; - char device[PROP_VALUE_MAX]; - char devicename[PROP_VALUE_MAX]; - int rc; - - rc = property_get("ro.board.platform", platform); - if (!rc || !ISMATCH(platform, ANDROID_TARGET)) + std::string platform = property_get("ro.board.platform"); + if (platform != ANDROID_TARGET) return; - property_get("ro.bootloader", bootloader); + std::string bootloader = property_get("ro.bootloader"); - property_set("ro.build.fingerprint", "samsung/SCL23/SCL23:4.4.2/KOT49H/SCL23KDU1AND1:user/release-keys"); - property_set("ro.build.description", "kltekdi-user 4.4.2 KOT49H SCL23KDU1AND1 release-keys"); - property_set("ro.product.model", "SCL23"); - property_set("ro.product.device", "kltekdi"); - property_set("telephony.sms.pseudo_multipart", "1"); - cdma_properties("1", "44054", "KDDI"); + property_set("ro.build.fingerprint", "samsung/SCL23/SCL23:4.4.2/KOT49H/SCL23KDU1AND1:user/release-keys"); + property_set("ro.build.description", "kltekdi-user 4.4.2 KOT49H SCL23KDU1AND1 release-keys"); + property_set("ro.product.model", "SCL23"); + property_set("ro.product.device", "kltekdi"); + property_set("telephony.sms.pseudo_multipart", "1"); + cdma_properties("1", "44054", "KDDI"); - property_get("ro.product.device", device); - strlcpy(devicename, device, sizeof(devicename)); - INFO("Found bootloader id %s setting build properties for %s device\n", bootloader, devicename); + std::string device = property_get("ro.product.device"); + INFO("Found bootloader id %s setting build properties for %s device\n", bootloader.c_str(), device.c_str()); } |
