Skip to contentSkip to conversation

splice.2: Use 'off64_t' instead of 'loff_t'

PATCH In review Alejandro Colomar 2 participants 2 messages Feb 15, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

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$

---
 man2/splice.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man2/splice.2 +2 -2
index 6e9029281..d07639810 100644
@@ -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
#1 lore raw

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_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$

Thanks! Patch applied.

Cheers,

Michael

Quoted 20 lines
---
 man2/splice.2 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
man2/splice.2 +2 -2
index 6e9029281..d07639810 100644
@@ -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/