diff --git a/modules/common/appspawn_silk.c b/modules/common/appspawn_silk.c index 2f8d9141062478031e78286e85cd0aede4c30a75..b709edeaae20249c4f4224b6d606348b860ae5e9 100644 --- a/modules/common/appspawn_silk.c +++ b/modules/common/appspawn_silk.c @@ -110,7 +110,7 @@ APPSPAWN_STATIC bool ParseSilkConfig(const cJSON *root, struct SilkConfig *confi void LoadSilkConfig(void) { cJSON *root = GetJsonObjFromFile(SILK_JSON_CONFIG_PATH); - APPSPAWN_CHECK(root != NULL, return, "Failed to load silk config"); + APPSPAWN_CHECK_LOGW(root != NULL, return, "Failed to load silk config"); (void)ParseSilkConfig(root, &g_silkConfig); cJSON_Delete(root); } diff --git a/modules/sandbox/normal/sandbox_common.cpp b/modules/sandbox/normal/sandbox_common.cpp index 9eca40fcceac87c6e97377e583ce1b45db680cfa..ac7f323c665ad6fb2cdf134966308695310543df 100644 --- a/modules/sandbox/normal/sandbox_common.cpp +++ b/modules/sandbox/normal/sandbox_common.cpp @@ -153,14 +153,14 @@ int SandboxCommon::LoadAppSandboxConfigCJson(AppSpawnMgr *content) std::string appPath = path + SandboxCommonDef::APP_JSON_CONFIG; APPSPAWN_LOGI("LoadAppSandboxConfig %{public}s", appPath.c_str()); sandboxCJsonRoot = GetJsonObjFromFile(appPath.c_str()); - APPSPAWN_CHECK((sandboxCJsonRoot != nullptr && cJSON_IsObject(sandboxCJsonRoot)), continue, + APPSPAWN_CHECK_LOGW((sandboxCJsonRoot != nullptr && cJSON_IsObject(sandboxCJsonRoot)), continue, "Failed to load app data sandbox config %{public}s", appPath.c_str()); StoreCJsonConfig(sandboxCJsonRoot, SandboxCommonDef::SANDBOX_APP_JSON_CONFIG); std::string isolatedPath = path + SandboxCommonDef::APP_ISOLATED_JSON_CONFIG; APPSPAWN_LOGI("LoadAppSandboxConfig %{public}s", isolatedPath.c_str()); sandboxCJsonRoot = GetJsonObjFromFile(isolatedPath.c_str()); - APPSPAWN_CHECK((sandboxCJsonRoot != nullptr && cJSON_IsObject(sandboxCJsonRoot)), continue, + APPSPAWN_CHECK_LOGW((sandboxCJsonRoot != nullptr && cJSON_IsObject(sandboxCJsonRoot)), continue, "Failed to load app data sandbox config %{public}s", isolatedPath.c_str()); StoreCJsonConfig(sandboxCJsonRoot, SandboxCommonDef::SANDBOX_ISOLATED_JSON_CONFIG); } diff --git a/modules/sandbox/sandbox_dec.c b/modules/sandbox/sandbox_dec.c index 8e36ea2e4113757d97e0ab797eb7b2e865b14136..58ffa3ca10dc4b22f93c0e535a2f323d224681f0 100644 --- a/modules/sandbox/sandbox_dec.c +++ b/modules/sandbox/sandbox_dec.c @@ -106,7 +106,7 @@ static int SetDenyConstraintDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -140,7 +140,7 @@ static int SetForcedPrefixDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -175,7 +175,7 @@ void SetDecPolicy(void) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); DestroyDecPolicyInfos(g_decPolicyInfos); g_decPolicyInfos = NULL; return; diff --git a/standard/appspawn_kickdog.c b/standard/appspawn_kickdog.c index ef01677b8802e50df7c776abfa727d1e3bfed14c..73acd4e4c0a522e75f0d89ba64a7a411314c7f31 100644 --- a/standard/appspawn_kickdog.c +++ b/standard/appspawn_kickdog.c @@ -127,7 +127,7 @@ static int CheckKernelType(bool *isLinux) APPSPAWN_STATIC int SpawnKickDogStart(AppSpawnMgr *mgrContent) { APPSPAWN_CHECK(mgrContent != NULL, return 0, "content is null"); - APPSPAWN_CHECK((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || + APPSPAWN_CHECK_LOGW((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || (mgrContent->content.mode == MODE_FOR_NWEB_SPAWN) || (mgrContent->content.mode == MODE_FOR_HYBRID_SPAWN), return 0, "Mode %{public}u no need enable watchdog", mgrContent->content.mode); diff --git a/util/src/appspawn_utils.c b/util/src/appspawn_utils.c index 20d8ca2e0c125943322d2d02f967666afb70ee61..3553cb7e8f27ccf5b4ba7dbc860a70a93dda35a2 100644 --- a/util/src/appspawn_utils.c +++ b/util/src/appspawn_utils.c @@ -300,7 +300,7 @@ int ParseJsonConfig(const char *basePath, const char *fileName, ParseConfig pars APPSPAWN_CHECK(len > 0 && (size_t)len < sizeof(path), ret = APPSPAWN_SANDBOX_INVALID; continue, "Failed to format sandbox config file name %{public}s %{public}s", files->paths[i], fileName); cJSON *root = GetJsonObjFromFile(path); - APPSPAWN_CHECK(root != NULL, ret = APPSPAWN_SANDBOX_INVALID; + APPSPAWN_CHECK_LOGW(root != NULL, ret = APPSPAWN_SANDBOX_INVALID; continue, "Failed to load app data sandbox config %{public}s", path); int rc = parseConfig(root, context); if (rc != 0) {