!2885 modify error log level

Merge pull request !2885 from 杨浩/modifyInitErrorLog
This commit is contained in:
openharmony_ci 2024-06-05 02:52:53 +00:00 committed by Gitee
commit b3a5ca956b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 4 deletions

View File

@ -403,7 +403,11 @@ static int LoadDefaultParam_(const char *fileName, uint32_t mode,
buffer[buffSize - 1] = '\0';
int ret = SplitParamString(buffer, exclude, count, loadOneParam, &mode);
PARAM_ONLY_CHECK(ret != PARAM_DEFAULT_PARAM_MEMORY_NOT_ENOUGH, return PARAM_DEFAULT_PARAM_MEMORY_NOT_ENOUGH);
PARAM_CHECK(ret == 0, continue, "Failed to set param '%s' error:%d ", buffer, ret);
if (mode == LOAD_PARAM_ONLY_ADD && ret == PARAM_CODE_READ_ONLY) {
PARAM_WARNING_CHECK(ret == 0, continue, "Set param '%s' error:%d with only add mode", buffer, ret);
} else {
PARAM_CHECK(ret == 0, continue, "Failed to set param '%s' error:%d ", buffer, ret);
}
paramNum++;
}
(void)fclose(fp);

View File

@ -289,11 +289,11 @@ static int GetSandboxInfo(sandbox_t *sandbox, cJSON *root, const char *itemName)
BEGET_ERROR_CHECK(!(sandbox == NULL || root == NULL || itemName == NULL), return -1,
"Get sandbox mount info with invalid argument");
cJSON *obj = cJSON_GetObjectItem(root, itemName);
BEGET_ERROR_CHECK(obj != NULL, return 0, "Cannot find item \' %s \' in sandbox config", itemName);
BEGET_ERROR_CHECK(cJSON_IsArray(obj), return 0, "ItemName %s with invalid type, should be array", itemName);
BEGET_WARNING_CHECK(obj != NULL, return 0, "Cannot find item \' %s \' in sandbox config", itemName);
BEGET_WARNING_CHECK(cJSON_IsArray(obj), return 0, "ItemName %s with invalid type, should be array", itemName);
int counts = cJSON_GetArraySize(obj);
BEGET_ERROR_CHECK(counts > 0, return 0, "Item %s array size is zero.", itemName);
BEGET_WARNING_CHECK(counts > 0, return 0, "Item %s array size is zero.", itemName);
AddInfoToSandboxCallback func = NULL;
if (strcmp(itemName, SANDBOX_MOUNT_PATH_TAG) == 0) {
func = AddMountInfoToSandbox;