lkml.org 
[lkml]   [2001]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectftruncate not extending files?
On Thu, Mar 01, 2001 at 06:19:35PM +0000, Alan Cox wrote:
> > In that case, why was it changed for FAT only? Ext2 will still
> > happily enlarge a file by truncating it.
>
> ftruncate() and truncate() may extend a file but they are not required to
> do so.

Stevens' example code assumes that it does. And given the number of people
that regard his work as Holy, it might not be a bad idea to implement Linux
so that it does what people think it does.

I would've sworn, based on the fact that I saw people do it, that ftruncate
was a legitimate way to extend a file - especially useful in combination
with mmap().

I don't really care where it is done, in glibc or in the kernel - but let's
honor this convention and not needlessly break code.

Regards,

bert hubert

--
http://www.PowerDNS.com Versatile DNS Services
Trilab The Technology People
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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