未验证 提交 b1822e6c 编写于 作者: O openharmony_ci 提交者: Gitee

!671 解决sysparam和begetutils符号一致

Merge pull request !671 from Mupceet/init0524
...@@ -297,4 +297,43 @@ if (defined(ohos_lite)) { ...@@ -297,4 +297,43 @@ if (defined(ohos_lite)) {
part_name = "init" part_name = "init"
} }
ohos_static_library("libbegetutil_static") {
sources = [ "//base/startup/init_lite/services/log/init_log.c" ]
sources += syspara_sources
sources += [ "syspara/param_wrapper.cpp" ]
defines = [
"INIT_AGENT",
"INIT_FILE",
"_GNU_SOURCE",
]
if (target_cpu == "arm64") {
defines += [ "SUPPORT_64BIT" ]
}
include_dirs = [
"./include",
"//third_party/bounds_checking_function/include",
"//base/startup/init_lite/services/include",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/param/include",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/interfaces/innerkits/include/syspara",
"//base/startup/init_lite/interfaces/innerkits/syspara",
]
deps = [
"//base/startup/init_lite/services/loopevent:loopevent",
"//base/startup/init_lite/services/param:param_client",
"//base/startup/init_lite/services/utils:libinit_tools",
"//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/openssl:libcrypto_shared",
]
external_deps = [
"hilog_native:libhilog_base",
"utils_base:utils",
]
part_name = "init"
}
} }
...@@ -231,8 +231,13 @@ const char *GetBuildTime(void) ...@@ -231,8 +231,13 @@ const char *GetBuildTime(void)
const char *GetSerial(void) const char *GetSerial(void)
{ {
static const char *ohos_serial = NULL; static char ohos_serial[PARAM_VALUE_LEN_MAX] = {0};
return GetProperty("ohos.boot.sn", &ohos_serial); uint32_t len = PARAM_VALUE_LEN_MAX;
int ret = SystemGetParameter("ohos.boot.sn", ohos_serial, &len);
if (ret != 0) {
return NULL;
}
return ohos_serial;
} }
int GetDevUdid(char *udid, int size) int GetDevUdid(char *udid, int size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册