提交 47a8bda5 编写于 作者: C cheng_jinsong

close chipset init

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
上级 c94657fd
......@@ -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.
先完成此消息的编辑!
想要评论请 注册