Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
22ee1b14
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
接近 2 年 前同步成功
通知
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看板
提交
22ee1b14
编写于
7月 28, 2021
作者:
S
sun_fan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init: fix code style
Signed-off-by:
N
sun_fan
<
sun_fan@hoperun.com
>
上级
593fe6e6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
9 deletion
+8
-9
services/include/init_service.h
services/include/init_service.h
+1
-1
services/src/init_service.c
services/src/init_service.c
+3
-3
services/src/init_service_manager.c
services/src/init_service_manager.c
+3
-3
services/src/uevent.c
services/src/uevent.c
+1
-2
未找到文件。
services/include/init_service.h
浏览文件 @
22ee1b14
...
...
@@ -71,7 +71,7 @@ typedef struct {
time_t
firstCriticalCrashTime
;
// record for critical
char
*
writepidFiles
[
MAX_WRITEPID_FILES
];
unsigned
int
attribute
;
int
importan
t
;
int
importan
ce
;
Perms
servPerm
;
struct
OnRestartCmd
*
onRestart
;
struct
ServiceSocket
*
socketCfg
;
...
...
services/src/init_service.c
浏览文件 @
22ee1b14
...
...
@@ -226,9 +226,9 @@ int ServiceStart(Service *service)
INIT_LOGI
(
"service->name is %s "
,
service
->
name
);
#ifndef OHOS_LITE
if
(
service
->
importan
t
!=
0
)
{
if
(
setpriority
(
PRIO_PROCESS
,
0
,
service
->
importan
t
)
!=
0
)
{
INIT_LOGE
(
"setpriority failed for %s, importan
t = %d"
,
service
->
name
,
service
->
important
);
if
(
service
->
importan
ce
!=
0
)
{
if
(
setpriority
(
PRIO_PROCESS
,
0
,
service
->
importan
ce
)
!=
0
)
{
INIT_LOGE
(
"setpriority failed for %s, importan
ce = %d"
,
service
->
name
,
service
->
importance
);
_exit
(
0x7f
);
// 0x7f: user specified
}
}
...
...
services/src/init_service_manager.c
浏览文件 @
22ee1b14
...
...
@@ -373,9 +373,9 @@ static int GetImportantValue(int value, Service *curServ)
}
#else
if
(
value
>=
MIN_IMPORTANT_LEVEL
&&
value
<=
MAX_IMPORTANT_LEVEL
)
{
// -20~19
curServ
->
importan
t
=
value
;
curServ
->
importan
ce
=
value
;
}
else
{
INIT_LOGE
(
"importan
t
level = %d, is not between -20 and 19, error"
,
value
);
INIT_LOGE
(
"importan
ce
level = %d, is not between -20 and 19, error"
,
value
);
return
SERVICE_FAILURE
;
}
#endif
...
...
@@ -399,7 +399,7 @@ static int GetServiceNumber(const cJSON* curArrItem, Service* curServ, const cha
}
int
value
=
(
int
)
cJSON_GetNumberValue
(
filedJ
);
// importan
t
value allow < 0
// importan
ce
value allow < 0
if
(
strncmp
(
targetField
,
IMPORTANT_STR_IN_CFG
,
strlen
(
IMPORTANT_STR_IN_CFG
))
!=
0
)
{
if
(
value
<
0
)
{
INIT_LOGE
(
"value = %d, error.service name is %s"
,
value
,
curServ
->
name
);
...
...
services/src/uevent.c
浏览文件 @
22ee1b14
...
...
@@ -363,11 +363,10 @@ struct DevPermissionMapper {
struct
DevPermissionMapper
DEV_MAPPER
[]
=
{
{
"/dev/binder"
,
0666
,
0
,
0
},
{
"/dev/input/event0"
,
0660
,
0
,
1004
},
{
"/dev/input/event0"
,
0660
,
0
,
0
},
{
"/dev/input/event1"
,
0660
,
0
,
1004
},
{
"/dev/input/mice"
,
0660
,
0
,
1004
},
{
"/dev/input/mouse0"
,
0660
,
0
,
0
},
{
"/dev/input/event0"
,
0660
,
0
,
0
},
{
"/dev/snd/timer"
,
0660
,
1000
,
1005
},
{
"/dev/zero"
,
0666
,
0
,
0
},
{
"/dev/full"
,
0666
,
0
,
0
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录