From fnaumann@mail.cs.uni-magdeburg.de Wed Aug 11 20:08:26 2004 Subject: Re: [MiNT] ftruncate (was: Re: Coreutils) From: Mark Duckworth To: mint@fishpool.com In-Reply-To: <4119E202.4060304@seznam.cz> References: <1091734488.9471.32.camel@localhost> <4119E202.4060304@seznam.cz> Content-Type: text/plain Message-Id: <1092247093.6809.0.camel@pikachu.atari-source.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 11 Aug 2004 13:58:13 -0400 Content-Transfer-Encoding: 7bit Delivered-To: mint@fishpool.com Delivered-To: mint@lists.fishpool.fi X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: mduckworth@atari-source.com Precedence: bulk List-help: List-unsubscribe: List-ID: X-List-ID: X-Milter: ClamAV 0.70/0.70kjel X-Milter: milter-regex 1.5jel X-Milter: ClamAV 0.70/0.70kjel X-Milter: milter-regex 1.5jel On Wed, 2004-08-11 at 05:08, Standa Opichal wrote: > Hi! > > Did you try this on the hostfs or on the ext2fs? The HOSTFS filesystem > doesn't implement this so far. I'm working on it however. Here is the > mintlib implementation: > > int > __ftruncate (int fd, off_t length) > { > long r; > > r = Fcntl (fd, &length, FTRUNCATE); > if (r < 0) { > __set_errno (-r); > return -1; > } > return 0; > } > > It would be good to have some replacement for the case when the > filesystem doesn't support this in mintlib. > > best regards > > STan > Stan, I tried this on Ext2. I do most package building on my falcon. Thanks, Mark