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

!519 Fix:修改bootchart在init中启动

Merge pull request !519 from 熊磊/master_0415
......@@ -25,7 +25,7 @@ static int bootchartCmdEnable(BShellHandle shell, int argc, char **argv)
char *helpArgs[] = {"bootchart", NULL};
BShellCmdHelp(shell, 1, helpArgs);
}
SystemSetParameter("init.bootchart.enabled", "1");
SystemSetParameter("persist.init.bootchart.enabled", "1");
return 0;
}
......@@ -35,7 +35,7 @@ static int bootchartCmdDisable(BShellHandle shell, int argc, char **argv)
char *helpArgs[] = {"bootchart", NULL};
BShellCmdHelp(shell, 1, helpArgs);
}
SystemSetParameter("init.bootchart.enabled", "0");
SystemSetParameter("persist.init.bootchart.enabled", "0");
return 0;
}
......@@ -47,7 +47,7 @@ static int bootchartCmdStart(BShellHandle shell, int argc, char **argv)
}
char enable[4] = {}; // 4 enable size
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) {
BShellEnvOutput(shell, "Not bootcharting\r\n");
return 0;
......
......@@ -18,6 +18,7 @@
"mkdir /data/service/el0 0711 root root",
"mount configfs none /config nodev noexec nosuid",
"load_persist_params ",
"bootchart start",
"chown access_token access_token /dev/access_token_id",
"chmod 0666 /dev/access_token_id"
]
......
......@@ -221,7 +221,7 @@ static int DoBootchartStart(void)
{
char enable[4] = {}; // 4 enable size
uint32_t size = sizeof(enable);
SystemReadParam("init.bootchart.enabled", enable, &size);
SystemReadParam("persist.init.bootchart.enabled", enable, &size);
if (strcmp(enable, "1") != 0) {
PLUGIN_LOGI("Not bootcharting");
return 0;
......@@ -310,4 +310,4 @@ PLUGIN_CONSTRUCTOR(void)
PluginRegister("bootchart", NULL, BootchartInit, BootchartExit);
PLUGIN_LOGI("bootchart pluginInterface %p %p",
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.
先完成此消息的编辑!
想要评论请 注册