From 858769090d82e03c0556aaa46af4274d8a791580 Mon Sep 17 00:00:00 2001 From: Timothy Manning Date: Fri, 6 Aug 2021 14:24:25 +1200 Subject: [PATCH] Fixed issues with 32 bit time tests Fixed the makefile to complile in 32 bit mode Fixed yaffs_endian.c to swap 32 bit sized times. Signed-off-by: Timothy Manning --- .../unit_tests/64_and_32_bit_time/32_bit/Makefile | 2 +- yaffs_endian.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/Makefile b/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/Makefile index 8bcaf72..7c12c25 100644 --- a/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/Makefile +++ b/direct/test-framework/unit_tests/64_and_32_bit_time/32_bit/Makefile @@ -21,7 +21,7 @@ YDI_FRAMEWORK_DIR = ../../../ CLEAN_OBJS = time_32_tests emfile-2k-0 emfile-nand emfile-nand128MB TESTFILES = time_32_tests.o -CFLAGS = -DYAFFS_USE_32_BIT_TIME_T +CFLAGS = -DCONFIG_YAFFS_USE_32_BIT_TIME_T all: time_32_tests YAFFS_TEST_OBJS = $(COMMONTESTOBJS) $(TESTFILES) diff --git a/yaffs_endian.c b/yaffs_endian.c index 571a35f..6103f4e 100644 --- a/yaffs_endian.c +++ b/yaffs_endian.c @@ -42,9 +42,9 @@ void yaffs_do_endian_oh(struct yaffs_dev *dev, struct yaffs_obj_hdr *oh) oh->yst_uid = swap_u32(oh->yst_uid); oh->yst_gid = swap_u32(oh->yst_gid); - oh->yst_atime = swap_ytime_t(oh->yst_atime); - oh->yst_mtime = swap_ytime_t(oh->yst_mtime); - oh->yst_ctime = swap_ytime_t(oh->yst_ctime); + oh->yst_atime = swap_u32(oh->yst_atime); + oh->yst_mtime = swap_u32(oh->yst_mtime); + oh->yst_ctime = swap_u32(oh->yst_ctime); oh->file_size_low = swap_u32(oh->file_size_low); -- 2.30.2