MCPcopy Create free account
hub / github.com/coreutils/coreutils / atomic_link

Function atomic_link

src/ln.c:159–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 already exist and -r is not specified. */
158
159static int
160atomic_link (char const *source, int destdir_fd, char const *dest_base)
161{
162 return (symbolic_link
163 ? (relative ? -1
164 : errnoize (symlinkat (source, destdir_fd, dest_base)))
165 : beware_hard_dir_link ? -1
166 : errnoize (linkat (AT_FDCWD, source, destdir_fd, dest_base,
167 logical ? AT_SYMLINK_FOLLOW : 0)));
168}
169
170/* Link SOURCE to a directory entry under DESTDIR_FD named DEST_BASE.
171 DEST is the full name of the destination, useful for diagnostics.

Callers 2

do_linkFunction · 0.85
mainFunction · 0.85

Calls 1

errnoizeFunction · 0.85

Tested by

no test coverage detected