From: Malcolm Beattie <mbeattie@sable.ox.ac.uk>
To: linux-kernel@vger.kernel.org
Subject: Re: ftruncate not extending files?
Date: Fri, 2 Mar 2001 09:57:02 +0000 [thread overview]
Message-ID: <20010302095701.A4685@sable.ox.ac.uk> (raw)
In-Reply-To: <Pine.LNX.4.30.0103011502050.23650-100000@swamp.bayern.net> <E14YXft-0008GK-00@the-village.bc.nu> <20010302084544.A26070@home.ds9a.nl>
In-Reply-To: <20010302084544.A26070@home.ds9a.nl>; from ahu@ds9a.nl on Fri, Mar 02, 2001 at 08:45:45AM +0100
bert hubert writes:
> I would've sworn, based on the fact that I saw people do it, that ftruncate
> was a legitimate way to extend a file
Well it's not SuSv2 standards compliant:
http://www.opengroup.org/onlinepubs/007908799/xsh/ftruncate.html
If the file previously was larger than length, the extra data is
discarded. If it was previously shorter than length, it is
unspecified whether the file is changed or its size increased. If
^^^^^^^^^^^
the file is extended, the extended area appears as if it were
zero-filled.
How "legitimate" relates to "SuSv2 standards compliant" is your call.
--Malcolm
--
Malcolm Beattie <mbeattie@sable.ox.ac.uk>
Unix Systems Programmer
Oxford University Computing Services
next prev parent reply other threads:[~2001-03-02 9:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-25 20:08 fat problem in 2.4.2 James D Strandboge
2001-02-25 20:20 ` Alan Cox
2001-03-01 14:25 ` Peter Daum
2001-03-01 15:09 ` [PATCH] " Alexander Viro
2001-03-02 0:21 ` Albert D. Cahalan
2001-03-01 18:19 ` Alan Cox
2001-03-01 19:39 ` [CFT][PATCH] " Alexander Viro
2001-03-01 20:05 ` Linus Torvalds
2001-03-01 20:52 ` Chris Mason
2001-03-01 20:56 ` Roman Zippel
2001-03-01 21:07 ` Alexander Viro
2001-03-01 21:27 ` Roman Zippel
2001-03-02 7:45 ` ftruncate not extending files? bert hubert
2001-03-02 9:57 ` Malcolm Beattie [this message]
2001-03-02 10:56 ` Dmitry A. Fedorov
2001-03-02 14:15 ` Hugh Dickins
2001-03-03 19:32 ` Kai Henningsen
[not found] ` <mng==20010302095701.A4685@sable.ox.ac.uk>
2001-03-02 23:41 ` Jens-Uwe Mager
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=20010302095701.A4685@sable.ox.ac.uk \
--to=mbeattie@sable.ox.ac.uk \
--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