Lines Matching defs:item

113 static unsigned long GetSandboxMountFlags(cJSON *item)
115 BEGET_ERROR_CHECK(item != NULL, return 0, "Invalid parameter.");
116 char *str = cJSON_GetStringValue(item);
222 typedef int (*AddInfoToSandboxCallback)(sandbox_t *sandbox, cJSON *item, const char *type);
224 static int AddMountInfoToSandbox(sandbox_t *sandbox, cJSON *item, const char *type)
226 BEGET_CHECK(sandbox != NULL && item != NULL && type != NULL, return -1);
227 char *srcPath = cJSON_GetStringValue(cJSON_GetObjectItem(item, SANDBOX_SOURCE));
229 char *dstPath = cJSON_GetStringValue(cJSON_GetObjectItem(item, SANDBOX_TARGET));
231 cJSON *obj = cJSON_GetObjectItem(item, SANDBOX_FLAGS);
244 cJSON *item = cJSON_GetArrayItem(obj, i);
245 tmpMount->flags |= GetSandboxMountFlags(item);
248 obj = cJSON_GetObjectItem(item, SANDBOX_IGNORE_ERRORS);
267 static int AddSymbolLinksToSandbox(sandbox_t *sandbox, cJSON *item, const char *type)
269 BEGET_CHECK(!(sandbox == NULL || item == NULL || type == NULL), return -1);
271 char *target = cJSON_GetStringValue(cJSON_GetObjectItem(item, SANDBOX_SYMLINK_TARGET));
273 char *name = cJSON_GetStringValue(cJSON_GetObjectItem(item, SANDBOX_SYMLINK_NAME));
292 BEGET_WARNING_CHECK(obj != NULL, return 0, "Cannot find item \' %s \' in sandbox config", itemName);
309 cJSON *item = cJSON_GetArrayItem(obj, i);
310 BEGET_ERROR_CHECK(item != NULL, return -1, "Failed get json array item %d", i);
311 BEGET_ERROR_CHECK(func(sandbox, item, itemName) == 0, return -1, "Failed add info to sandbox.");
323 "Cannot find item \' %s \' in sandbox config", SANDBOX_ROOT_TAG);