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

!2153 启动时间优化——启动恢复子系统方面

Merge pull request !2153 from zhaohaoran09/master
......@@ -21,7 +21,7 @@
static int InitEngEarlyHook(const HOOK_INFO *info, void *cookie)
{
char value[MAX_BUFFER_LEN] = {0};
int ret = GetParameterFromCmdLine("ohos.boot.eng_mode", value, MAX_BUFFER_LEN);
int ret = GetParameterFromCmdLine("ohos.boot.root_package", value, MAX_BUFFER_LEN);
if (ret == 0 && strcmp(value, "on") == 0) {
#ifndef STARTUP_INIT_TEST
InitModuleMgrInstall("init_eng");
......
......@@ -117,7 +117,7 @@ static void CmdlineIterator(const NAME_VALUE_PAIR *nv, void *context)
{ "reboot_reason", CommonDealFun },
{ "bootslots", CommonDealFun },
{ "sn", SnDealFun },
{ "eng_mode", CommonDealFun },
{ "root_package", CommonDealFun },
{ "serialno", SnDealFun }
};
......
......@@ -245,7 +245,7 @@ HWTEST_F(EngUnitTest, TestHook, TestSize.Level1)
HookMgrExecute(GetBootStageHookMgr(), INIT_GLOBAL_INIT, nullptr, nullptr);
PrepareCmdLineData();
HookMgrExecute(GetBootStageHookMgr(), INIT_GLOBAL_INIT, nullptr, nullptr);
const char *cmdLine = "ohos.boot.eng_mode=off ";
const char *cmdLine = "ohos.boot.root_package=off ";
CreateTestFile(BOOT_CMD_LINE, cmdLine);
HookMgrExecute(GetBootStageHookMgr(), INIT_GLOBAL_INIT, nullptr, nullptr);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册