Lines Matching refs:target

42 #define SANDBOX_SYMLINK_TARGET "target-name"
139 if (info->target != NULL) {
140 free(info->target);
141 info->target = NULL;
157 if (info->target != NULL) {
158 free(info->target);
159 info->target = NULL;
180 return strcmp(info->target, mountTarget);
241 tmpMount->target = strdup(dstPath);
242 BEGET_ERROR_CHECK(tmpMount->target != NULL, free(tmpMount); return -1, "Failed to dup target");
271 char *target = cJSON_GetStringValue(cJSON_GetObjectItem(item, SANDBOX_SYMLINK_TARGET));
272 BEGET_ERROR_CHECK(target != NULL, return 0, "Get target-name is null");
277 tmpLink->target = strdup(target);
278 BEGET_ERROR_CHECK(tmpLink->target != NULL, free(tmpLink); return -1, "Failed to dup target");
431 static int BindMount(const char *source, const char *target, unsigned long flags, SandboxTag tag)
433 if (source == NULL || target == NULL) {
441 BEGET_ERROR_CHECK(CheckAndMakeDir(target, mode) == 0, return -1, "Failed make %s dir.", target);
443 BEGET_ERROR_CHECK(CheckAndCreatFile(target, mode) == 0, return -1, "Failed make %s file.", target);
453 if (mount(source, target, NULL, tmpflags, NULL) != 0) {
454 BEGET_LOGE("Failed to bind mount \' %s \' to \' %s \', err = %d", source, target, errno);
481 char target[PATH_MAX] = {};
482 BEGET_ERROR_CHECK(snprintf_s(target, PATH_MAX, PATH_MAX - 1, "%s%s", rootPath, info->target) > 0,
484 int rc = BindMount(info->source, target, info->flags, info->tag);
486 BEGET_LOGW("Failed bind mount %s to %s.", info->source, target);
513 int rc = symlink(info->target, linkName);
518 BEGET_LOGE("Failed to link \' %s \' to \' %s \', err = %d", info->target, linkName, errno);
657 if (info->target != NULL) {
658 printf("Sandbox mounts list target: %s \n", info->target);
674 if (info->target != NULL) {
675 printf("Sandbox link list target: %s \n", info->target);