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

Function clone_file

src/copy.c:228–237  ·  view source on GitHub ↗

Perform the O(1) btrfs clone operation, if possible. Upon success, return 0. Otherwise, return -1 and set errno. */

Source from the content-addressed store, hash-verified

226/* Perform the O(1) btrfs clone operation, if possible.
227 Upon success, return 0. Otherwise, return -1 and set errno. */
228static inline int
229clone_file (MAYBE_UNUSED int dest_fd, MAYBE_UNUSED int src_fd)
230{
231#ifdef FICLONE
232 return ioctl (dest_fd, FICLONE, src_fd);
233#else
234 errno = ENOTSUP;
235 return -1;
236#endif
237}
238
239/* FIXME: describe */
240/* FIXME: rewrite this to use a hash table so we avoid the quadratic

Callers 1

copy_regFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected