From: Richard Henderson <rth@twiddle.net>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Dave <djdave@bigpond.net.au>, linux-kernel@vger.kernel.org
Subject: Re: ftruncate returning EPERM on vfat filesystem
Date: Sun, 7 Jan 2001 13:03:11 -0800 [thread overview]
Message-ID: <20010107130311.B26532@twiddle.net> (raw)
In-Reply-To: <Pine.LNX.4.30.0101071613130.1132-100000@athlon.internal> <E14FGI2-0002fo-00@the-village.bc.nu>
In-Reply-To: <E14FGI2-0002fo-00@the-village.bc.nu>
On Sun, Jan 07, 2001 at 01:55:15PM +0000, Alan Cox wrote:
> > + return -EPERM;
>
> To stop a case where the fs gets corrupted otherwise. You can change that to
> return 0 which is more correct but most not remove it.
While I suppose "0" is covered under "the result is unspecified", I
would suggest that EINVAL is a better choice: "The filedes argument
does not refer to a file on which this operation is possible".
The reason being that the normal reason for an extending ftruncate
is so that you can mmap it and not get SIGBUS for accessing past the
end of the file.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2001-01-07 21:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-07 6:47 ftruncate returning EPERM on vfat filesystem Dave
2001-01-07 13:55 ` Alan Cox
2001-01-07 15:20 ` Dave
2001-01-07 16:44 ` Daniel Phillips
2001-01-07 21:03 ` Richard Henderson [this message]
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=20010107130311.B26532@twiddle.net \
--to=rth@twiddle.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=djdave@bigpond.net.au \
--cc=linux-kernel@vger.kernel.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