Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
c056e3a1
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c056e3a1
编写于
5月 11, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add: ueventd parse config in vendor
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
b0aae888
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
2 deletion
+28
-2
ueventd/BUILD.gn
ueventd/BUILD.gn
+7
-1
ueventd/ueventd_main.c
ueventd/ueventd_main.c
+21
-1
未找到文件。
ueventd/BUILD.gn
浏览文件 @
c056e3a1
...
...
@@ -32,6 +32,7 @@ if (defined(ohos_lite)) {
include_dirs = [
"//third_party/bounds_checking_function/include",
"//base/startup/init_lite/services/include/param",
"//base/startup/init_lite/services/log",
"//base/startup/init_lite/interfaces/innerkits/include",
"//base/startup/init_lite/services/include",
...
...
@@ -41,6 +42,8 @@ if (defined(ohos_lite)) {
deps = [
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:param_client",
"//base/startup/init_lite/services/utils:libinit_tools",
"//third_party/bounds_checking_function:libsec_static",
]
}
...
...
@@ -120,7 +123,10 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/interfaces/innerkits/include",
]
deps = service_ueventd_deps
deps += [ "//base/startup/init_lite/interfaces/innerkits:libbegetutil" ]
deps += [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//base/startup/init_lite/services/param:param_client",
]
cflags = []
if (build_selinux) {
...
...
ueventd/ueventd_main.c
浏览文件 @
c056e3a1
...
...
@@ -13,13 +13,16 @@
* limitations under the License.
*/
#include <limits.h>
#include <poll.h>
#include "ueventd.h"
#include "ueventd_read_cfg.h"
#include "ueventd_socket.h"
#define INIT_LOG_TAG "ueventd"
#include "init_log.h"
#include "init_param.h"
#include "init_socket.h"
#include "securec.h"
static
void
PollUeventdSocketTimeout
(
int
ueventSockFd
)
{
...
...
@@ -46,7 +49,24 @@ static void PollUeventdSocketTimeout(int ueventSockFd)
int
main
(
int
argc
,
char
**
argv
)
{
char
*
ueventdConfigs
[]
=
{
"/etc/ueventd.config"
,
NULL
};
char
*
vendorConfig
=
NULL
;
do
{
char
hardware
[
CMDLINE_VALUE_LEN_MAX
]
=
{
0
};
unsigned
int
buffLen
=
(
unsigned
int
)
CMDLINE_VALUE_LEN_MAX
;
int
ret
=
SystemReadParam
(
"ohos.boot.hardware"
,
hardware
,
&
buffLen
);
if
(
ret
!=
0
)
{
INIT_LOGE
(
"Failed to get hardware parameter value"
);
break
;
}
char
configFile
[
PATH_MAX
]
=
{
0
};
ret
=
snprintf_s
(
configFile
,
PATH_MAX
,
PATH_MAX
-
1
,
"/vendor/etc/ueventd.%s.config"
,
hardware
);
if
(
ret
<
0
)
{
INIT_LOGE
(
"Failed to format vendor config file path"
);
break
;
}
vendorConfig
=
configFile
;
}
while
(
0
);
char
*
ueventdConfigs
[]
=
{
"/etc/ueventd.config"
,
vendorConfig
,
NULL
};
int
i
=
0
;
while
(
ueventdConfigs
[
i
]
!=
NULL
)
{
ParseUeventdConfigFile
(
ueventdConfigs
[
i
++
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录