summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorBruno Martins <bgcngm@gmail.com>2020-10-10 21:20:58 +0100
committerArian <arian.kulmer@web.de>2021-04-05 13:53:21 +0200
commitee2428d166c86c675d5c13fa23202cb18f5b8684 (patch)
tree7f885e20cbf4e157d344a589203cb3096b0845d9 /init
parent088c9ac1bdadf2c50cd005b4d77446bde9b093bc (diff)
shinano-common: Adapt init for 11
Change-Id: I0f2e7eb4677b5ffb41a4e68079d3afc0d2203679
Diffstat (limited to 'init')
-rw-r--r--init/init_shinano.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/init/init_shinano.cpp b/init/init_shinano.cpp
index 77b4a2d..b4e8b15 100644
--- a/init/init_shinano.cpp
+++ b/init/init_shinano.cpp
@@ -29,11 +29,24 @@
#include <stdlib.h>
+#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
+#include <sys/_system_properties.h>
+
#include <android-base/file.h>
#include <android-base/strings.h>
#include "vendor_init.h"
-#include "property_service.h"
+
+void property_override(char const prop[], char const value[], bool add = true)
+{
+ prop_info *pi;
+
+ pi = (prop_info*) __system_property_find(prop);
+ if (pi)
+ __system_property_update(pi, value, strlen(value));
+ else if (add)
+ __system_property_add(prop, strlen(prop), value, strlen(value));
+}
void import_kernel_cmdline(const std::function<void(const std::string&, const std::string&)>& fn) {
std::string cmdline;
@@ -53,11 +66,11 @@ static void import_kernel_nv(const std::string& key, const std::string& value)
// We only want the bootloader version
if (key == "oemandroidboot.s1boot") {
- android::init::property_set("ro.boot.oemandroidboot.s1boot", value.c_str());
+ property_override("ro.boot.oemandroidboot.s1boot", value.c_str());
}
}
-void init_target_properties()
+void vendor_load_properties()
{
import_kernel_cmdline(import_kernel_nv);
}