Thread (2 messages) 2 messages, 2 authors, 2020-12-29

off64_t, loff_t

From: Alejandro Colomar (man-pages) <hidden>
Date: 2020-12-29 14:04:06

Hi Michael,

This is related to:
https://lore.kernel.org/linux-man/CAKgNAkhuL9JRG_YhVG6Y-yjobDVAGjrUSdcQ4kV-4MABjZiwRQ@mail.gmail.com/ (local)


copy_file_range(2) says it uses 'loff_t':

$ man 2 copy_file_range \
|sed -n '/SYNOPSIS/,/DESCRIPTION/{/copy_file_range/,/^$/p}';
       ssize_t copy_file_range(int fd_in, loff_t *off_in,
                               int fd_out, loff_t *off_out,
                               size_t len, unsigned int flags);

But glibc uses 'off64_t' AFAICS:

$ syscall='copy_file_range';
$ pattern="^[^ ]*ssize_t ${syscall}[ ]*(";
$ find glibc/ -name '*.h' \
|xargs sed -n -e "/${pattern}/p" -e "/${pattern}/,/^$/p" \
|sed -n -e "/${pattern}/,/;/p" -e '/^$/p' \
|uniq;
ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
			 int __outfd, __off64_t *__poutoff,
			 size_t __length, unsigned int __flags);


What would you do about it?
`sed -i 's/loff_t/off64_t/' man2/copy_file_range.2`?

Thanks,

Alex


-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help