MCPcopy Create free account
hub / github.com/RsyncProject/rsync / do_link

Function do_link

syscall.c:290–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

288
289#if defined HAVE_LINK || defined HAVE_LINKAT
290int do_link(const char *old_path, const char *new_path)
291{
292 if (dry_run) return 0;
293 RETURN_ERROR_IF_RO_OR_LO;
294#ifdef HAVE_LINKAT
295 return linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0);
296#else
297 return link(old_path, new_path);
298#endif
299}
300
301/*
302 Symlink-race-safe variant of do_link() for receiver-side use. See

Callers 1

do_link_atFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected