ELFTC_COPYFILE(3)
π NAME
elftc_copyfile β convenience function to copy data. literally that's the whole vibe bestie β¨
π«Ά LIBRARY
library βlibelftcβ β she lives there, periodt.
β¨ SYNOPSIS
okay so here's the synopsis exactly as the page gives it, in and all β don't @ me, I don't make the rules:
#include <libelftc.h>
in
elftc_copyfile(int ifd, int ofd);
πΈ DESCRIPTION
okay so elftc_copyfile() copies the contents of the file referenced by argument ifd to the file referenced by argument ofd. that's the main character behavior right there π
the argument ifd should contain a file descriptor opened for reading, with its file offset at the beginning of the file. like, beginning-beginning, bestie β not mid-file energy π
the argument ofd should contain a file descriptor opened for writing. that's it. that's the setup π¦
π₯ RETURN VALUES
upon successful completion, the value 0 is returned β slay, we love a clean win β¨ otherwise, the value -1 is returned and the global variable errno is set to indicate the error. so if it flops, errno is literally there to spill the tea π
π ERRORS
the function elftc_copyfile() may fail with any of the errors returned by fstat(2), mmap(2), munmap(2), read(2), write(2), or malloc(3). no cap, those are the ones listed π«Ά
π SEE ALSO
mwah π this iconic little page is from Debian, dated December 11, 2011, and it's serving ELFTC_COPYFILE(3) β bye bestie, go copy some data responsibly ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libelftc 15.0.0
- Copyright (c) 2011 Joseph Koshy. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms