Index: yaffs/nand_ecc.c =================================================================== --- yaffs.orig/nand_ecc.c +++ yaffs/nand_ecc.c @@ -25,6 +25,7 @@ #endif #include "yportenv.h" +#include "nand_ecc.h" /* * Pre-calculated 256-way 1 byte column parity Index: yaffs/utils/mkyaffsimage.c =================================================================== --- yaffs.orig/utils/mkyaffsimage.c +++ yaffs/utils/mkyaffsimage.c @@ -32,16 +32,13 @@ #include #include "yaffs_guts.h" +#include "nand_ecc.h" #define MAX_OBJECTS 10000 const char * mkyaffsimage_c_version = "$Id: mkyaffsimage.c,v 1.7 2003/07/16 03:00:48 charles Exp $"; -// External functions for ECC on data -void nand_calculate_ecc (const u_char *dat, u_char *ecc_code); -int nand_correct_data (u_char *dat, u_char *read_ecc, u_char *calc_ecc); - typedef struct { @@ -119,6 +116,7 @@ return -1; } +#if 0 // NCB added 10/9/2002 static __u16 yaffs_CalcNameSum(const char *name) { @@ -135,6 +133,7 @@ } return sum; } +#endif static void yaffs_CalcECC(const __u8 *data, yaffs_Spare *spare) Index: yaffs/utils/mkyaffs.c =================================================================== --- yaffs.orig/utils/mkyaffs.c +++ yaffs/utils/mkyaffs.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include Index: yaffs/devextras.h =================================================================== --- yaffs.orig/devextras.h +++ yaffs/devextras.h @@ -201,6 +201,7 @@ +#ifndef DT_UNKNOWN /* * File types */ @@ -213,6 +214,7 @@ #define DT_LNK 10 #define DT_SOCK 12 #define DT_WHT 14 +#endif #ifndef WIN32 #include Index: yaffs/nand_ecc.h =================================================================== --- /dev/null +++ yaffs/nand_ecc.h @@ -0,0 +1,28 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yportenv.h: Portable services used by yaffs. This is done to allow + * simple migration from kernel space into app space for testing. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering + * + * Created by Charles Manning + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 2.1 as + * published by the Free Software Foundation. + * + * + * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. + * + */ + +#ifndef __NAND_ECC_H__ +#define __NAND_ECC_H__ + +/* External functions for ECC on data */ + +void nand_calculate_ecc (const u_char *dat, u_char *ecc_code); +int nand_correct_data (u_char *dat, u_char *read_ecc, u_char *calc_ecc); + +#endif