lkml.org 
[lkml]   [2001]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
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.


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/

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