| 452 | } |
| 453 | |
| 454 | int hard_link_one(struct file_struct *file, const char *fname, |
| 455 | const char *oldname, int terse) |
| 456 | { |
| 457 | if (do_link_at(oldname, fname) < 0) { |
| 458 | enum logcode code; |
| 459 | if (terse) { |
| 460 | if (!INFO_GTE(NAME, 1)) |
| 461 | return 0; |
| 462 | code = FINFO; |
| 463 | } else |
| 464 | code = FERROR_XFER; |
| 465 | rsyserr(code, errno, "link %s => %s failed", |
| 466 | full_fname(fname), oldname); |
| 467 | return 0; |
| 468 | } |
| 469 | |
| 470 | file->flags |= FLAG_HLINK_DONE; |
| 471 | |
| 472 | return 1; |
| 473 | } |
| 474 | |
| 475 | void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx, |
| 476 | STRUCT_STAT *stp, int itemizing, enum logcode code, |
no test coverage detected