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

!2110 fix:sub init不支持updater模式

Merge pull request !2110 from cheng_jinsong/updater-subinit
......@@ -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.
先完成此消息的编辑!
想要评论请 注册