1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

io: Remove copy_file_range emulation [BZ #24744]

The kernel is evolving this interface (e.g., removal of the
restriction on cross-device copies), and keeping up with that
is difficult.  Applications which need the function should
run kernels which support the system call instead of relying on
the imperfect glibc emulation.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
Florian Weimer
2019-06-28 09:39:21 +02:00
parent 1626f499d1
commit 5a659ccc0e
14 changed files with 81 additions and 783 deletions

View File

@ -1,4 +1,4 @@
/* Generic implementation of copy_file_range.
/* Stub implementation of copy_file_range.
Copyright (C) 2017-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@ -16,7 +16,15 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
#define COPY_FILE_RANGE_DECL
#define COPY_FILE_RANGE copy_file_range
#include <errno.h>
#include <unistd.h>
#include <io/copy_file_range-compat.c>
ssize_t
copy_file_range (int infd, __off64_t *pinoff,
int outfd, __off64_t *poutoff,
size_t length, unsigned int flags)
{
__set_errno (ENOSYS);
return -1;
}
stub_warning (copy_file_range)