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

!2029 close chipset init

Merge pull request !2029 from cheng_jinsong/init-0609
......@@ -235,8 +235,10 @@ static void SubInitMain(InitContextType type, int readFd, int writeFd)
static int SubInitSetSelinuxContext(InitContextType type)
{
PLUGIN_CHECK(type < INIT_CONTEXT_MAIN, return -1, "Invalid type %d", type);
#ifdef INIT_SUPPORT_CHIPSET_INIT
#ifdef WITH_SELINUX
setcon(g_subContext[type]);
#endif
#endif
return 0;
}
......
......@@ -83,5 +83,9 @@ int SetSubInitContext(const ConfigContext *context, const char *service)
int CheckExecuteInSubInit(const ConfigContext *context)
{
#ifdef INIT_SUPPORT_CHIPSET_INIT
return !(context == NULL || context->type == INIT_CONTEXT_MAIN || g_currContext.type != INIT_CONTEXT_MAIN);
#else
return 0;
#endif
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册