Lines Matching full:paths
52 static int allocate_paths(struct xfer_context *xfer, char *const *paths, in allocate_paths() argument
63 xfer->paths = calloc(count, sizeof(xfer->paths[0])); in allocate_paths()
64 if (xfer->paths == NULL) in allocate_paths()
69 xfer->paths[0] = strndup("-", PATH_MAX); in allocate_paths()
70 if (xfer->paths[0] == NULL) in allocate_paths()
74 xfer->paths[i] = strndup(paths[i], PATH_MAX); in allocate_paths()
75 if (xfer->paths[i] == NULL) in allocate_paths()
180 !strcmp(xfer->paths[0], "-")) { in validate_options()
185 xfer->paths[0]); in validate_options()
196 if (!strcmp(xfer->paths[0], "-")) { in validate_options()
204 // container files, it can be used to generate several paths. in validate_options()
208 // Require several paths for containers. in validate_options()
433 xfer->paths[index] = malloc(len); in generate_path_with_suffix()
434 if (xfer->paths[index] == NULL) in generate_path_with_suffix()
438 snprintf(xfer->paths[index], len, single_format, template, in generate_path_with_suffix()
441 snprintf(xfer->paths[index], len, multiple_format, template, in generate_path_with_suffix()
460 xfer->paths[index] = malloc(len); in generate_path_without_suffix()
461 if (xfer->paths[index] == NULL) in generate_path_without_suffix()
465 snprintf(xfer->paths[index], len, single_format, template); in generate_path_without_suffix()
467 snprintf(xfer->paths[index], len, multiple_format, template, in generate_path_without_suffix()
506 assert(xfer->paths); in create_paths()
507 assert(xfer->paths[0]); in create_paths()
508 assert(xfer->paths[0][0] != '\0'); in create_paths()
511 template = xfer->paths[0]; in create_paths()
512 free(xfer->paths); in create_paths()
513 xfer->paths = NULL; in create_paths()
516 xfer->paths = calloc(path_count, sizeof(*xfer->paths)); in create_paths()
517 if (xfer->paths == NULL) { in create_paths()
556 if (!strcmp(xfer->paths[i], allowed_duplication[j])) in fixup_paths()
562 template = xfer->paths[i]; in fixup_paths()
563 xfer->paths[i] = NULL; in fixup_paths()
580 if (!strcmp(xfer->paths[0], "-")) in xfer_options_fixup_paths()
597 // Check duplication of the paths. in xfer_options_fixup_paths()
601 if (!strcmp(xfer->paths[i], allowed_duplication[j])) in xfer_options_fixup_paths()
608 if (!strcmp(xfer->paths[i], xfer->paths[j])) { in xfer_options_fixup_paths()
623 fprintf(stderr, " %d: %s\n", i, xfer->paths[i]); in xfer_options_fixup_paths()