mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-23 16:20:00 +00:00
!2885 modify error log level
Merge pull request !2885 from 杨浩/modifyInitErrorLog
This commit is contained in:
commit
b3a5ca956b
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user