MCPcopy Index your code
hub / github.com/RsyncProject/rsync / hard_link_one

Function hard_link_one

hlink.c:454–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

452}
453
454int 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
475void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx,
476 STRUCT_STAT *stp, int itemizing, enum logcode code,

Callers 2

try_dests_regFunction · 0.85
atomic_createFunction · 0.85

Calls 3

do_link_atFunction · 0.85
full_fnameFunction · 0.85
rsyserrFunction · 0.70

Tested by

no test coverage detected