linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin Pärtel" <martin.partel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [patch] posix_fallocate.3: EBADF possible when lacking read access
Date: Tue, 09 Oct 2012 01:43:20 +0300	[thread overview]
Message-ID: <50735708.7090900@gmail.com> (raw)

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

                 reply	other threads:[~2012-10-08 22:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50735708.7090900@gmail.com \
    --to=martin.partel-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).