From cdd314d1f1c9200acf900a8aa477801f64720d04 Mon Sep 17 00:00:00 2001 From: xlei1030 Date: Fri, 15 Apr 2022 15:50:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bootchart=E5=9C=A8init?= =?UTF-8?q?=E4=B8=AD=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xlei1030 --- services/begetctl/bootchart_cmd.c | 6 +++--- services/etc/init.cfg | 1 + services/plugin/bootchart/bootchart.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/services/begetctl/bootchart_cmd.c b/services/begetctl/bootchart_cmd.c index 0c50549b..b0ab4f75 100755 --- a/services/begetctl/bootchart_cmd.c +++ b/services/begetctl/bootchart_cmd.c @@ -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; diff --git a/services/etc/init.cfg b/services/etc/init.cfg index f0cb2059..5e294535 100755 --- a/services/etc/init.cfg +++ b/services/etc/init.cfg @@ -22,6 +22,7 @@ "mkdir /data/service 0711 root root", "mkdir /data/service/el0 0711 root root", "load_persist_params ", + "bootchart start", "chown access_token access_token /dev/access_token_id", "chmod 0666 /dev/access_token_id" ] diff --git a/services/plugin/bootchart/bootchart.c b/services/plugin/bootchart/bootchart.c index 5514fd03..74d70615 100755 --- a/services/plugin/bootchart/bootchart.c +++ b/services/plugin/bootchart/bootchart.c @@ -229,7 +229,7 @@ static int DoBootchartStart(void) char enable[4] = {}; // 4 enable size uint32_t size = sizeof(enable); 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) { PLUGIN_LOGI("Not bootcharting"); @@ -330,4 +330,4 @@ PLUGIN_CONSTRUCTOR(void) PLUGIN_LOGI("bootchart pluginInterface %p %p %p", g_pluginInterface, g_pluginInterface->pluginRegister, GetPluginInterface, BootchartInit, BootchartExit); -} \ No newline at end of file +} -- GitLab