splice.2: Use 'off64_t' instead of 'loff_t'
PATCH 1/1 splice.2: Use 'off64_t' instead of 'loff_t'
The kernel syscall uses 'loff_t', but the glibc wrapper uses 'off64_t'. Let's document the wrapper prototype, as in other pages.
......
.../glibc$ grep_glibc_prototype splice sysdeps/unix/sysv/linux/bits/fcntl-linux.h:398:
extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
__off64_t *__offout, size_t __len, unsigned int __flags);
.../glibc$
Signed-off-by Alejandro Colomar <[email protected]>
--- man2/splice.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man2/splice.2 +2 -2
@@ -31,8 +31,8 @@ splice \- splice data to/from a pipe .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <fcntl.h> .PP -.BI "ssize_t splice(int " fd_in ", loff_t *" off_in ", int " fd_out , -.BI " loff_t *" off_out ", size_t " len \ +.BI "ssize_t splice(int " fd_in ", off64_t *" off_in ", int " fd_out , +.BI " off64_t *" off_out ", size_t " len \ ", unsigned int " flags ); .\" Return type was long before glibc 2.7 .fi
Signature · 1 line
2.30.0
Hi Alex,
Quoted 5 lines · Alejandro Colomar
The kernel syscall uses '
loff_t', but the glibc wrapper uses 'off64_t'. Let's document the wrapper prototype, as in other pages.......
Quoted 8 lines
.../glibc$
grep_glibc_prototypesplicesysdeps/unix/sysv/linux/bits/fcntl-linux.h:398:
extern__ssize_tsplice (int__fdin,__off64_t*__offin, int__fdout,__off64_t *__offout, size_t __len, unsigned int __flags);.../glibc$
Signed-off-by Alejandro Colomar <[email protected]>
Thanks! Patch applied.
Cheers,
Michael
Quoted 20 lines
--- man2/splice.2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man2/splice.2 +2
-2@@ -31,8 +31,8 @@ splice \- splice data to/from a pipe .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" .B #include <fcntl.h> .PP -.BI "ssize_t splice(int " fd_in ", loff_t *" off_in ", int " fd_out , -.BI " loff_t *" off_out ", size_t " len \ +.BI "ssize_t splice(int " fd_in ", off64_t *" off_in ", int " fd_out , +.BI " off64_t *" off_out ", size_t " len \ ", unsigned int " flags ); .\" Return type was long before glibc 2.7 .fi
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/