Subject: Re: ftruncate(2) and length bigger than filesize
To: None <email@example.com>
From: Jason R Thorpe <firstname.lastname@example.org>
Date: 04/20/2000 08:18:15
On Thu, Apr 20, 2000 at 12:32:49PM +0200, PER4MANCE, J. Dolecek wrote:
> Some software depends on extending behaviour od ftruncate(2),
> e.g. emacs (see kern/9926). This is even documented
> behaviour on Solaris.
> What is "right" here ? Should we fix those filesystem which
> do not extend the file in ftuncate(2) and adapt manpage
> accordingly, or "fix" the ffs and msdosfs and maybe others
> so that they don't extend the file if length passed
> to ftruncate(2) is longer than file size ?
We should probably look up ftruncate(2) in SUSv2 and check. Tho, I
agree that our behaviour should at least be consistent.
-- Jason R. Thorpe <email@example.com>