[03/26] Linux: copy_file_range syscall number is always available

Message ID 49f28ea934a2bb9b46c13da2b1230ea990875943.1581279333.git.fweimer@redhat.com
State New
Headers show
Series
  • Linux cleanups enabled by built-in system call tables
Related show

Commit Message

Florian Weimer Feb. 9, 2020, 8:19 p.m.
Due to the built-in tables, __NR_copy_file_range is always defined.
---
 sysdeps/unix/sysv/linux/copy_file_range.c | 5 -----
 1 file changed, 5 deletions(-)

-- 
2.24.1

Comments

Adhemerval Zanella Feb. 27, 2020, 11:06 p.m. | #1
On 09/02/2020 17:19, Florian Weimer wrote:
> Due to the built-in tables, __NR_copy_file_range is always defined.


LGTM, thanks. 

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>


> ---

>  sysdeps/unix/sysv/linux/copy_file_range.c | 5 -----

>  1 file changed, 5 deletions(-)

> 

> diff --git a/sysdeps/unix/sysv/linux/copy_file_range.c b/sysdeps/unix/sysv/linux/copy_file_range.c

> index 65597ca025..a73c89f079 100644

> --- a/sysdeps/unix/sysv/linux/copy_file_range.c

> +++ b/sysdeps/unix/sysv/linux/copy_file_range.c

> @@ -25,11 +25,6 @@ copy_file_range (int infd, __off64_t *pinoff,

>                   int outfd, __off64_t *poutoff,

>                   size_t length, unsigned int flags)

>  {

> -#ifdef __NR_copy_file_range

>    return SYSCALL_CANCEL (copy_file_range, infd, pinoff, outfd, poutoff,

>                           length, flags);

> -#else

> -  __set_errno (ENOSYS);

> -  return -1;

> -#endif

>  }

>

Patch

diff --git a/sysdeps/unix/sysv/linux/copy_file_range.c b/sysdeps/unix/sysv/linux/copy_file_range.c
index 65597ca025..a73c89f079 100644
--- a/sysdeps/unix/sysv/linux/copy_file_range.c
+++ b/sysdeps/unix/sysv/linux/copy_file_range.c
@@ -25,11 +25,6 @@  copy_file_range (int infd, __off64_t *pinoff,
                  int outfd, __off64_t *poutoff,
                  size_t length, unsigned int flags)
 {
-#ifdef __NR_copy_file_range
   return SYSCALL_CANCEL (copy_file_range, infd, pinoff, outfd, poutoff,
                          length, flags);
-#else
-  __set_errno (ENOSYS);
-  return -1;
-#endif
 }