X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.c;h=7678896692927f47290c1b8b6dadc1da7deb41d0;hp=e95d87022f95d3f51cea961671eef476e410ef89;hb=1f3d64d1d804fef6715126dead54bf30b176c67e;hpb=b4d5215f18486403d16f2e776000e43eba052f40 diff --git a/yaffs_guts.c b/yaffs_guts.c index e95d870..7678896 100644 --- a/yaffs_guts.c +++ b/yaffs_guts.c @@ -1,8 +1,7 @@ /* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * @@ -5158,8 +5157,9 @@ void yaffs_oh_size_load(struct yaffs_dev *dev, loff_t fsize, int do_endian) { - oh->file_size_low = (fsize & 0xFFFFFFFF); - oh->file_size_high = ((fsize >> 32) & 0xFFFFFFFF); + oh->file_size_low = FSIZE_LOW(fsize); + + oh->file_size_high = FSIZE_HIGH(fsize); if (do_endian) { yaffs_do_endian_u32(dev, &oh->file_size_low); @@ -5181,8 +5181,7 @@ loff_t yaffs_oh_to_size(struct yaffs_dev *dev, struct yaffs_obj_hdr *oh, yaffs_do_endian_u32 (dev, &low); yaffs_do_endian_u32 (dev, &high); } - retval = (((loff_t) high) << 32) | - (((loff_t) low) & 0xFFFFFFFF); + retval = FSIZE_COMBINE(high, low); } else { u32 low = oh->file_size_low;