提交 7d7f4a75 编写于 作者: H handyohos

feat: load autorun modules

1)加载自动运行的模块
Signed-off-by: Nhandyohos <zhangxiaotian@huawei.com>
Change-Id: I9cde4931c2b8237680ce5a946fe43ebb678e69ec
上级 db92fbf1
......@@ -64,8 +64,16 @@ static int moduleMgrCommandsInit(int stage, int prio, void *cookie)
return 0;
}
static int loadAutorunModules(int stage, int prio, void *cookie)
{
MODULE_MGR *autorun = ModuleMgrScan("init/autorun");
INIT_LOGI("Load autorun modules return %p", autorun);
return 0;
}
MODULE_CONSTRUCTOR(void)
{
// Depends on parameter service
InitAddGlobalInitHook(0, loadAutorunModules);
InitAddPreCfgLoadHook(0, moduleMgrCommandsInit);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册