X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ffsx_test%2Fyaffs_fsx.c;h=26a8536d1a8458c3af41a0583b83e8e3911947dc;hb=e8cfe05cf0d057f6978c37943e51b17bb14664e3;hp=1e110b9b725242356477aa2cccf9e5b732528318;hpb=02d566cf1ffdd2d91d4abbaf106ef4fb3affbdc6;p=yaffs2.git diff --git a/direct/fsx_test/yaffs_fsx.c b/direct/fsx_test/yaffs_fsx.c index 1e110b9..26a8536 100644 --- a/direct/fsx_test/yaffs_fsx.c +++ b/direct/fsx_test/yaffs_fsx.c @@ -67,6 +67,7 @@ #include #include #include +#include #include "yaffsfs.h" @@ -421,14 +422,14 @@ check_trunc_hack(void) { struct yaffs_stat statbuf; - yaffs_truncate(fd, (off_t)0); - yaffs_truncate(fd, (off_t)100000); + yaffs_ftruncate(fd, (off_t)0); + yaffs_ftruncate(fd, (off_t)100000); yaffs_fstat(fd, &statbuf); if (statbuf.st_size != (off_t)100000) { prt("no extend on truncate! not posix!\n"); exit(130); } - yaffs_truncate(fd, (off_t)0); + yaffs_ftruncate(fd, (off_t)0); } @@ -579,7 +580,7 @@ dotruncate(unsigned size) (debug && (monitorstart == -1 || monitorend == -1 || size <= monitorend))) prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size); - if (yaffs_truncate(fd, (off_t)size) == -1) { + if (yaffs_ftruncate(fd, (off_t)size) == -1) { prt("ftruncate1: %x\n", size); prterr("dotruncate: ftruncate"); report_failure(160); @@ -605,7 +606,7 @@ writefileimage() iret, (unsigned long long)file_size); report_failure(172); } - if (lite ? 0 : yaffs_truncate(fd, file_size) == -1) { + if (lite ? 0 : yaffs_ftruncate(fd, file_size) == -1) { prt("ftruncate2: %llx\n", (unsigned long long)file_size); prterr("writefileimage: ftruncate"); report_failure(173);