[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] ftruncate (was: Re: Coreutils)
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