mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-12 13:16:06 +00:00
bugfix: GetBootStageHookMgr auto create HookMgr
1) GetBootStageHookMgr中自动创建HookMgr,便于静态链接模块使用。 Signed-off-by: handyohos <zhangxiaotian@huawei.com> Change-Id: I585f73d7ca8117da79599a8231dbd6b74e07345b
This commit is contained in:
parent
1261fd89ca
commit
2ef9602319
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user