diff --git a/services/init/init_service_manager.c b/services/init/init_service_manager.c index 55d1740dd75595961927c03e75f529aba3dc4e2d..e3505d3215539848b5bc85f8bbb29727454168d5 100755 --- a/services/init/init_service_manager.c +++ b/services/init/init_service_manager.c @@ -990,14 +990,14 @@ void ParseAllServices(const cJSON *fileRoot) continue; } Service *service = GetServiceByName(fieldStr); - if (service != NULL) { - INIT_LOGE("Service \' %s \' already exist", fieldStr); - continue; - } - service = AddService(fieldStr); if (service == NULL) { - INIT_LOGE("Failed to create service name %s", fieldStr); - continue; + service = AddService(fieldStr); + 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; int ret = ParseOneService(curItem, service); diff --git a/services/init/standard/init.c b/services/init/standard/init.c index 9e3cc34fa2fd76b081cdf5cdd929b1e8a931aa0f..b8b6229c146ac0863e910bfb0d97afae012b4668 100755 --- a/services/init/standard/init.c +++ b/services/init/standard/init.c @@ -218,15 +218,15 @@ static void StartInitSecondStage(void) void SystemPrepare(void) { - INIT_LOGI("Start init first stage."); MountBasicFs(); CreateDeviceNode(); LogInit(); // Make sure init log always output to /dev/kmsg. EnableDevKmsg(); + INIT_LOGI("Start init first stage."); // Only ohos normal system support // 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) { StartInitSecondStage(); }