Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy_file_range.2: Document glibc wrapper instead of kernel syscall
Glibc uses 'off64_t' instead of 'loff_t'. ...... Glibc prototype: $ syscall='copy_file_range'; $ ret='ssize_t'; $ find glibc/ -type f -name '*.h' \ |xargs pcregrep -Mn "(?s)^[\w\s]*${ret}\s*${syscall}\s*\(.*?;"; glibc/posix/unistd.h:1121: ssize_t copy_file_range (int __infd, __off64_t *__pinoff, int __outfd, __off64_t *__poutoff, size_t __length, unsigned int __flags); ...... Testing example: $ man ./man2/copy_file_range.2 \ |sed -n '/^EXAMPLES/,/^SEE ALSO/p' \ |head -n -1 \ |tail -n +2 \ >copy_file_range.c $ gcc -Wall -Wextra -Werror -pedantic copy_file_range.c -o copy_file_range $ ./copy_file_range Usage: ./copy_file_range <source> <destination> $ tee a >/dev/null asdf $ tee b >/dev/null qwerty zxcvbn $ ./copy_file_range a b $ cat a asdf $ cat b asdf Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
- Loading branch information