提交 cdd314d1 编写于 作者: X xlei1030

修改bootchart在init中启动

Signed-off-by: Nxlei1030 <xionglei6@huawei.com>
上级 76dc5f3c
...@@ -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;
......
...@@ -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"
] ]
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册