提交 c3a00c3a 编写于 作者: C cheng_jinsong

not support sub init in updater mode

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
上级 2b9695a6
......@@ -15,6 +15,7 @@
#include "init_context.h"
#include "init_module_engine.h"
#include "init_utils.h"
#include "plugin_adapter.h"
#include "securec.h"
......@@ -69,6 +70,9 @@ int ExecuteCmdInSubInit(const ConfigContext *context, const char *name, const ch
int SetSubInitContext(const ConfigContext *context, const char *service)
{
if (InUpdaterMode() == 1) { // not support sub init in update mode
return 0;
}
PLUGIN_CHECK(context != NULL, return -1, "Invalid context");
if (context->type >= INIT_CONTEXT_MAIN) {
g_currContext.type = INIT_CONTEXT_MAIN;
......@@ -83,6 +87,9 @@ int SetSubInitContext(const ConfigContext *context, const char *service)
int CheckExecuteInSubInit(const ConfigContext *context)
{
if (InUpdaterMode() == 1) { // not support sub init in update mode
return 0;
}
#ifdef INIT_SUPPORT_CHIPSET_INIT
return !(context == NULL || context->type == INIT_CONTEXT_MAIN || g_currContext.type != INIT_CONTEXT_MAIN);
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册