Home | History | Annotate | Download | only in cp

Lines Matching refs:curr

332 	FTSENT *curr;
343 for (any_failed = 0; (curr = fts_read(ftsp)) != NULL;) {
345 switch (curr->fts_info) {
349 warnx("%s: %s", curr->fts_path,
350 strerror(curr->fts_errno));
354 warnx("%s: directory causes a cycle", curr->fts_path);
364 if ((curr->fts_namelen +
367 to.p_path, curr->fts_name);
391 if (curr->fts_level == FTS_ROOTLEVEL) {
393 p = strrchr(curr->fts_path, '/');
395 (int)(p - curr->fts_path + 1);
397 if (!strcmp(&curr->fts_path[base],
401 base = curr->fts_pathlen;
404 p = &curr->fts_path[base];
405 nlen = curr->fts_pathlen - base;
428 if (to_stat.st_dev == curr->fts_statp->st_dev &&
429 to_stat.st_ino == curr->fts_statp->st_ino) {
431 to.p_path, curr->fts_path);
433 if (S_ISDIR(curr->fts_statp->st_mode))
434 (void)fts_set(ftsp, curr, FTS_SKIP);
437 if (!S_ISDIR(curr->fts_statp->st_mode) &&
440 to.p_path, curr->fts_path);
447 switch (curr->fts_statp->st_mode & S_IFMT) {
451 ((fts_options & FTS_COMFOLLOW) && curr->fts_level == 0)) {
452 if (copy_file(curr, dne))
455 if (copy_link(curr, !dne))
461 if (curr->fts_info == FTS_D)
463 curr->fts_path);
464 (void)fts_set(ftsp, curr, FTS_SKIP);
474 if (curr->fts_info == FTS_D) /* First pass */
487 curr->fts_statp->st_mode | S_IRWXU) < 0)
498 else if (curr->fts_info == FTS_DP) /* Second pass */
506 if (pflag && setfile(curr->fts_statp, 0))
510 curr->fts_statp->st_mode);
515 curr->fts_path);
524 if (copy_special(curr->fts_statp, !dne))
527 if (copy_file(curr, dne))
532 if (copy_fifo(curr->fts_statp, !dne))
535 if (copy_file(curr, dne))
539 if (copy_file(curr, dne))
544 (void)printf("%s -> %s\n", curr->fts_path, to.p_path);