aboutsummaryrefslogtreecommitdiff
path: root/io/copy_file_range.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-06-28 09:39:21 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-06-28 09:39:21 +0200
commit5a659ccc0ec217ab02a4c273a1f6d346a359560a (patch)
treef82ef13a75f14209cbc97ecee79336d8bb4df37c /io/copy_file_range.c
parent1626f499d159f17d5d99dc41497b52074f3850df (diff)
downloadglibc-5a659ccc0ec217ab02a4c273a1f6d346a359560a.tar
glibc-5a659ccc0ec217ab02a4c273a1f6d346a359560a.tar.gz
glibc-5a659ccc0ec217ab02a4c273a1f6d346a359560a.tar.bz2
glibc-5a659ccc0ec217ab02a4c273a1f6d346a359560a.zip
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>
Diffstat (limited to 'io/copy_file_range.c')
-rw-r--r--io/copy_file_range.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/io/copy_file_range.c b/io/copy_file_range.c
index 7b968be19d..59fb979773 100644
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -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)