* [patch] posix_fallocate.3: EBADF possible when lacking read access
@ 2012-10-08 22:43 Martin Pärtel
0 siblings, 0 replies; only message in thread
From: Martin Pärtel @ 2012-10-08 22:43 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
posix_fallocate on a write-only FD may fail with a EBADF when fallocate(2) is unsupported by the filesystem and glibc must emulate it.
The emulation requires read-write access to the file. The source code is in glibc's sysdeps/posix/posix_fallocate.c
Applies to git master.
diff --git a/man3/posix_fallocate.3 b/man3/posix_fallocate.3
index 6fae367..b92c140 100644
--- a/man3/posix_fallocate.3
+++ b/man3/posix_fallocate.3
@@ -71,7 +71,8 @@ is not set.
.TP
.B EBADF
.I fd
-is not a valid file descriptor, or is not opened for writing.
+is not a valid file descriptor, or is not opened for
+both reading and writing.
.TP
.B EFBIG
.I offset+len
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-08 22:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 22:43 [patch] posix_fallocate.3: EBADF possible when lacking read access Martin Pärtel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).