提交 33e408d6 编写于 作者: C cheng_jinsong

fix parse cfg priority

Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
上级 918f334e
...@@ -990,14 +990,14 @@ void ParseAllServices(const cJSON *fileRoot) ...@@ -990,14 +990,14 @@ void ParseAllServices(const cJSON *fileRoot)
continue; continue;
} }
Service *service = GetServiceByName(fieldStr); Service *service = GetServiceByName(fieldStr);
if (service != NULL) {
INIT_LOGE("Service \' %s \' already exist", fieldStr);
continue;
}
service = AddService(fieldStr);
if (service == NULL) { if (service == NULL) {
INIT_LOGE("Failed to create service name %s", fieldStr); service = AddService(fieldStr);
continue; if (service == NULL) {
INIT_LOGE("Failed to add service name %s", fieldStr);
continue;
}
} else {
INIT_LOGI("Service %s already exists, updating.", fieldStr);
} }
service->pid = -1; service->pid = -1;
int ret = ParseOneService(curItem, service); int ret = ParseOneService(curItem, service);
......
...@@ -218,15 +218,15 @@ static void StartInitSecondStage(void) ...@@ -218,15 +218,15 @@ static void StartInitSecondStage(void)
void SystemPrepare(void) void SystemPrepare(void)
{ {
INIT_LOGI("Start init first stage.");
MountBasicFs(); MountBasicFs();
CreateDeviceNode(); CreateDeviceNode();
LogInit(); LogInit();
// Make sure init log always output to /dev/kmsg. // Make sure init log always output to /dev/kmsg.
EnableDevKmsg(); EnableDevKmsg();
INIT_LOGI("Start init first stage.");
// Only ohos normal system support // Only ohos normal system support
// two stages of init. // two stages of init.
// If we are in updater mode, only one stage of init, // If we are in updater mode, only one stage of init.
if (InUpdaterMode() == 0) { if (InUpdaterMode() == 0) {
StartInitSecondStage(); StartInitSecondStage();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册