[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ftruncate returning EPERM on vfat filesystem
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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:52    [W:0.172 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site