[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] ftruncate (was: Re: Coreutils)



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


Mark Duckworth wrote:
Hello guys,

I'm trying to build coreutils and it seems like most of the tools work
as advertised however some of them are failing tests.  I performed some
changes to make stat and sort work, and I also added the MiNT specific
code for df and mountlist.  Now I'm getting a nice failure in dd:

make[1]: Entering directory `/g/coreutils-5.2.1/tests/dd'
make[2]: Entering directory `/g/coreutils-5.2.1'
make[2]: Leaving directory `/g/coreutils-5.2.1'
dd (coreutils) 5.2.1
Written by Paul Rubin, David MacKenzie, and Stuart Kemp.

Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
skip-seek-1...
skip-seek-2...
skip-seek-3...
-: test skip-seek-3: mismatch, comparing skip-seek-3.5 (actual) and
skip-seek-3.2 (expected)
*** skip-seek-3.5       Thu Aug  5 15:12:16 2004
--- skip-seek-3.2       Thu Aug  5 15:12:16 2004
***************
*** 1 ****
! zyxwv56789
\ No newline at end of file
--- 1 ----
! zyxwv
\ No newline at end of file
block-sync-1...
FAIL: skip-seek
======================================
1 of 1 tests failed
Please report to bug-coreutils@gnu.org
======================================
make[1]: *** [check-TESTS] Error 1
make[1]: Leaving directory `/g/coreutils-5.2.1/tests/dd'
make: *** [check-am] Error 2
root@washi:/g/coreutils-5.2.1/tests/dd>

It's important to note that I applied the patch that I found Andreas of
SuSe answering on, a patch to priv-check that stops problems in our
situation from happening, specifically running the check as root with a
different version of fileutils software in your path, however this
seemed to make no difference.  For a little while I had the no-x tests
fail due to access denied issues.  Some things seem a little weird but
simple usage of all the utils works great.
Anyway, I was wondering what level of success I should look for with
these tests?  I'm somewhat curious to attempt installation of the utils
on my system (building an rpm without make check) and then reattempting
the checks to see if things improve.

Thanks,