Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105796063
D5162.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D5162.diff
View Options
Index: head/lib/libc/sys/lseek.2
===================================================================
--- head/lib/libc/sys/lseek.2
+++ head/lib/libc/sys/lseek.2
@@ -131,8 +131,14 @@
.Dv SEEK_HOLE
to optimise their behavior for ranges of zeros, but must not depend on it to
find all such ranges in a file.
+Each file is presented as having a zero-size virtual hole at the very
+end of the file.
The existence of a hole at the end of every data region allows for easy
-programming and implies that a virtual hole exists at the end of the file.
+programming and also provides compatibility to the original imlementation
+in Solaris.
+It also causes the current file size (i.e. end-of-file offset) to be returned
+to indicate that there are no more holes past the supplied
+.Fa offset .
Applications should use
.Fn fpathconf _PC_MIN_HOLE_SIZE
or
@@ -176,9 +182,11 @@
For
.Dv SEEK_DATA ,
there are no more data regions past the supplied offset.
-For
-.Dv SEEK_HOLE ,
-there are no more holes past the supplied offset.
+Due to existence of the hole at the end of the file, for
+.Dv SEEK_HOLE
+this error is only returned when the
+.Fa offset
+already points to the end-of-file position.
.It Bq Er EOVERFLOW
The resulting file offset would be a value which cannot be represented
correctly in an object of type
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 7:53 PM (19 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15545871
Default Alt Text
D5162.diff (1 KB)
Attached To
Mode
D5162: Better document "virtual hole" feature of the lseek(SEEK_HOLE)
Attached
Detach File
Event Timeline
Log In to Comment