Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
cdd314d1
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看板
提交
cdd314d1
编写于
4月 15, 2022
作者:
X
xlei1030
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改bootchart在init中启动
Signed-off-by:
N
xlei1030
<
xionglei6@huawei.com
>
上级
76dc5f3c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
5 deletion
+6
-5
services/begetctl/bootchart_cmd.c
services/begetctl/bootchart_cmd.c
+3
-3
services/etc/init.cfg
services/etc/init.cfg
+1
-0
services/plugin/bootchart/bootchart.c
services/plugin/bootchart/bootchart.c
+2
-2
未找到文件。
services/begetctl/bootchart_cmd.c
浏览文件 @
cdd314d1
...
@@ -25,7 +25,7 @@ static int bootchartCmdEnable(BShellHandle shell, int argc, char **argv)
...
@@ -25,7 +25,7 @@ static int bootchartCmdEnable(BShellHandle shell, int argc, char **argv)
char
*
helpArgs
[]
=
{
"bootchart"
,
NULL
};
char
*
helpArgs
[]
=
{
"bootchart"
,
NULL
};
BShellCmdHelp
(
shell
,
1
,
helpArgs
);
BShellCmdHelp
(
shell
,
1
,
helpArgs
);
}
}
SystemSetParameter
(
"init.bootchart.enabled"
,
"1"
);
SystemSetParameter
(
"
persist.
init.bootchart.enabled"
,
"1"
);
return
0
;
return
0
;
}
}
...
@@ -35,7 +35,7 @@ static int bootchartCmdDisable(BShellHandle shell, int argc, char **argv)
...
@@ -35,7 +35,7 @@ static int bootchartCmdDisable(BShellHandle shell, int argc, char **argv)
char
*
helpArgs
[]
=
{
"bootchart"
,
NULL
};
char
*
helpArgs
[]
=
{
"bootchart"
,
NULL
};
BShellCmdHelp
(
shell
,
1
,
helpArgs
);
BShellCmdHelp
(
shell
,
1
,
helpArgs
);
}
}
SystemSetParameter
(
"init.bootchart.enabled"
,
"0"
);
SystemSetParameter
(
"
persist.
init.bootchart.enabled"
,
"0"
);
return
0
;
return
0
;
}
}
...
@@ -47,7 +47,7 @@ static int bootchartCmdStart(BShellHandle shell, int argc, char **argv)
...
@@ -47,7 +47,7 @@ static int bootchartCmdStart(BShellHandle shell, int argc, char **argv)
}
}
char
enable
[
4
]
=
{};
// 4 enable size
char
enable
[
4
]
=
{};
// 4 enable size
uint32_t
size
=
sizeof
(
enable
);
uint32_t
size
=
sizeof
(
enable
);
int
ret
=
SystemGetParameter
(
"init.bootchart.enabled"
,
enable
,
&
size
);
int
ret
=
SystemGetParameter
(
"
persist.
init.bootchart.enabled"
,
enable
,
&
size
);
if
(
ret
!=
0
||
strcmp
(
enable
,
"1"
)
!=
0
)
{
if
(
ret
!=
0
||
strcmp
(
enable
,
"1"
)
!=
0
)
{
BShellEnvOutput
(
shell
,
"Not bootcharting
\r\n
"
);
BShellEnvOutput
(
shell
,
"Not bootcharting
\r\n
"
);
return
0
;
return
0
;
...
...
services/etc/init.cfg
浏览文件 @
cdd314d1
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
"mkdir /data/service 0711 root root",
"mkdir /data/service 0711 root root",
"mkdir /data/service/el0 0711 root root",
"mkdir /data/service/el0 0711 root root",
"load_persist_params ",
"load_persist_params ",
"bootchart start",
"chown access_token access_token /dev/access_token_id",
"chown access_token access_token /dev/access_token_id",
"chmod 0666 /dev/access_token_id"
"chmod 0666 /dev/access_token_id"
]
]
...
...
services/plugin/bootchart/bootchart.c
浏览文件 @
cdd314d1
...
@@ -229,7 +229,7 @@ static int DoBootchartStart(void)
...
@@ -229,7 +229,7 @@ static int DoBootchartStart(void)
char
enable
[
4
]
=
{};
// 4 enable size
char
enable
[
4
]
=
{};
// 4 enable size
uint32_t
size
=
sizeof
(
enable
);
uint32_t
size
=
sizeof
(
enable
);
if
(
g_pluginInterface
->
systemReadParam
!=
NULL
)
{
if
(
g_pluginInterface
->
systemReadParam
!=
NULL
)
{
g_pluginInterface
->
systemReadParam
(
"init.bootchart.enabled"
,
enable
,
&
size
);
g_pluginInterface
->
systemReadParam
(
"
persist.
init.bootchart.enabled"
,
enable
,
&
size
);
}
}
if
(
strcmp
(
enable
,
"1"
)
!=
0
)
{
if
(
strcmp
(
enable
,
"1"
)
!=
0
)
{
PLUGIN_LOGI
(
"Not bootcharting"
);
PLUGIN_LOGI
(
"Not bootcharting"
);
...
@@ -330,4 +330,4 @@ PLUGIN_CONSTRUCTOR(void)
...
@@ -330,4 +330,4 @@ PLUGIN_CONSTRUCTOR(void)
PLUGIN_LOGI
(
"bootchart pluginInterface %p %p %p"
,
PLUGIN_LOGI
(
"bootchart pluginInterface %p %p %p"
,
g_pluginInterface
,
g_pluginInterface
->
pluginRegister
,
GetPluginInterface
,
g_pluginInterface
,
g_pluginInterface
->
pluginRegister
,
GetPluginInterface
,
BootchartInit
,
BootchartExit
);
BootchartInit
,
BootchartExit
);
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录