X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_guts.h;h=5ebc3787b4d46f905f028816ac4ed9f2a308edea;hp=6bcf12dcd07fe676beb97f58cd43cae47d0f467c;hb=3439fa4e60dd9799766b2c101f799ed9e565b632;hpb=b4d5215f18486403d16f2e776000e43eba052f40 diff --git a/yaffs_guts.h b/yaffs_guts.h index 6bcf12d..5ebc378 100644 --- a/yaffs_guts.h +++ b/yaffs_guts.h @@ -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 * @@ -1050,4 +1049,21 @@ void yaffs_count_blocks_by_state(struct yaffs_dev *dev, int bs[10]); int yaffs_find_chunk_in_file(struct yaffs_obj *in, int inode_chunk, struct yaffs_ext_tags *tags); +/* + * Define LOFF_T_32_BIT if a 32-bit LOFF_T is being used. + * Not serious if you get this wrong - you might just get some warnings. +*/ + +#ifdef LOFF_T_32_BIT +#define FSIZE_LOW(fsize) (fsize) +#define FSIZE_HIGH(fsize) 0 +#define FSIZE_COMBINE(high, low) (low) +#else +#define FSIZE_LOW(fsize) ((fsize) & 0xffffffff) +#define FSIZE_HIGH(fsize)(((fsize) >> 32) & 0xffffffff) +#define FSIZE_COMBINE(high, low) ((((loff_t) (high)) << 32) | \ + (((loff_t) (low)) & 0xFFFFFFFF)) +#endif + + #endif