diff options
Diffstat (limited to 'direct/fsx_test')
-rw-r--r-- | direct/fsx_test/Makefile | 8 | ||||
-rw-r--r-- | direct/fsx_test/yaffs_fsx.c | 11 |
2 files changed, 11 insertions, 8 deletions
diff --git a/direct/fsx_test/Makefile b/direct/fsx_test/Makefile index 30323ad..359a523 100644 --- a/direct/fsx_test/Makefile +++ b/direct/fsx_test/Makefile @@ -14,11 +14,13 @@ # # NB Warning this Makefile does not include header dependencies. # -# $Id: Makefile,v 1.1 2007-10-16 00:46:33 charles Exp $ +# $Id: Makefile,v 1.2 2008-05-05 07:58:58 charles Exp $ #EXTRA_COMPILE_FLAGS = -DYAFFS_IGNORE_TAGS_ECC -CFLAGS = -Wall -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -g $(EXTRA_COMPILE_FLAGS) -DNO_Y_INLINE +CFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE +CFLAGS+= -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES +CFLAGS+= -Wall -g $(EXTRA_COMPILE_FLAGS) CFLAGS+= -fstack-check -O0 #CFLAGS+= -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations @@ -42,7 +44,7 @@ YAFFSSYMLINKS = devextras.h yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h ya yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h yaffs_nandemul2k.h \ yaffs_nand.c yaffs_nand.h \ yaffs_tagsvalidity.c yaffs_tagsvalidity.h yaffs_checkptrw.h yaffs_checkptrw.c \ - yaffs_qsort.c yaffs_qsort.h + yaffs_qsort.c yaffs_qsort.h yaffs_getblockinfo.h YAFFSDIRECTSYMLINKS = yaffscfg2k.c yaffs_fileem2k.c yaffsfs.c yaffs_flashif.h \ yaffs_fileem2k.h yaffsfs.h yaffs_malloc.h yaffs_ramdisk.h ydirectenv.h \ 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 <unistd.h> #include <stdarg.h> #include <errno.h> +#include <time.h> #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); |