提交 2ef96023 编写于 作者: H handyohos

bugfix: GetBootStageHookMgr auto create HookMgr

1) GetBootStageHookMgr中自动创建HookMgr,便于静态链接模块使用。
Signed-off-by: Nhandyohos <zhangxiaotian@huawei.com>
Change-Id: I585f73d7ca8117da79599a8231dbd6b74e07345b
上级 1261fd89
......@@ -254,6 +254,15 @@ static HOOK_MGR *bootStageHookMgr = NULL;
HOOK_MGR *GetBootStageHookMgr()
{
if (bootStageHookMgr != NULL) {
return bootStageHookMgr;
}
/*
* Create bootstage hook manager for booting only.
* When boot completed, this manager will be destroyed.
*/
bootStageHookMgr = HookMgrCreate(INIT_BOOTSTAGE_HOOK_NAME);
return bootStageHookMgr;
}
......@@ -359,12 +368,6 @@ void SystemConfig(void)
options.preHook = InitPreHook;
options.postHook = InitPostHook;
/*
* Create bootstage hook manager for booting only.
* When boot completed, this manager will be destroyed.
*/
bootStageHookMgr = HookMgrCreate(INIT_BOOTSTAGE_HOOK_NAME);
HookMgrExecute(GetBootStageHookMgr(), INIT_GLOBAL_INIT, (void *)&timingStat, (void *)&options);
InitServiceSpace();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册