All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: lseek(SEEK_DATA)
       [not found] <20200404165739.GT21484@bombadil.infradead.org>
@ 2020-04-06 11:00 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; only message in thread
From: Michael Kerrisk (man-pages) @ 2020-04-06 11:00 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: linux-man

[CC+=linux-man@]

Hi Matthew,

On Sat, 4 Apr 2020 at 18:57, Matthew Wilcox <willy@infradead.org> wrote:
>
>
> The current (*) text of the lseek manpage is ambiguous about the behaviour
> of lseek(SEEK_DATA) for a file which is entirely a hole (or the end of
> the file is a hole and the pos lies within the hole).  The draft POSIX
> language is specific (ENXIO is returned when whence is SEEK_DATA and
> offset lies within the final hole of the file).  Could I trouble you to
> wordsmith that in?
>
> (*) I'm looking at 5.05 dated 2019-03-06
>
> If you want to look at the draft POSIX text, it's here:
> https://www.austingroupbugs.net/view.php?id=415

Thanks. I applied the patch below.

Cheers,

Michael


diff --git a/man2/lseek.2 b/man2/lseek.2
index 32331aba5..04972c082 100644
--- a/man2/lseek.2
+++ b/man2/lseek.2
@@ -212,7 +212,13 @@ or
 .BR SEEK_HOLE ,
 and
 .I offset
-is beyond the end of the file.
+is beyond the end of the file, or
+.I whence
+is
+.B SEEK_DATA
+and
+.I offset
+is within a hole at the end of the file.
 .TP
 .B EOVERFLOW
 .\" HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)


-- 
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 related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-04-06 11:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200404165739.GT21484@bombadil.infradead.org>
2020-04-06 11:00 ` lseek(SEEK_DATA) 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.