All of lore.kernel.org
 help / color / mirror / Atom feed
* off64_t, loff_t
@ 2020-12-29 14:03 Alejandro Colomar (man-pages)
  2020-12-29 20:03 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2020-12-29 14:03 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man

Hi Michael,

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


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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: off64_t, loff_t
  2020-12-29 14:03 off64_t, loff_t Alejandro Colomar (man-pages)
@ 2020-12-29 20:03 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-12-29 20:03 UTC (permalink / raw)
  To: Alejandro Colomar (man-pages); +Cc: linux-man

Hi Alex,

On Tue, 29 Dec 2020 at 15:03, Alejandro Colomar (man-pages)
<alx.manpages@gmail.com> wrote:
>
> Hi Michael,
>
> This is related to:
> https://lore.kernel.org/linux-man/CAKgNAkhuL9JRG_YhVG6Y-yjobDVAGjrUSdcQ4kV-4MABjZiwRQ@mail.gmail.com/
>
>
> 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`?

Yes, I think that change would be appropriate.

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-29 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 14:03 off64_t, loff_t Alejandro Colomar (man-pages)
2020-12-29 20:03 ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.