X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fbasic-test%2Fyaffs_ramdisk.c;h=f6e7773c6d1588bdb07a3870ae554ab6c35ed67c;hp=0b47adfa131b761cd69bf40026726750c7eeb99f;hb=41573908f821bcb40750e7c069ea8f5178f630e5;hpb=e33554a67753729f6b74677473cf0ec3b8d35a7e diff --git a/direct/basic-test/yaffs_ramdisk.c b/direct/basic-test/yaffs_ramdisk.c index 0b47adf..f6e7773 100644 --- a/direct/basic-test/yaffs_ramdisk.c +++ b/direct/basic-test/yaffs_ramdisk.c @@ -15,7 +15,7 @@ * yaffs_ramdisk.c: yaffs ram disk component * This provides a ram disk under yaffs. * NB this is not intended for NAND emulation. - * Use this with dev->useNANDECC enabled, then ECC overheads are not required. + * Use this with dev->use_nand_ecc enabled, then ECC overheads are not required. */ const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04:06:47 charles Exp $"; @@ -43,25 +43,25 @@ const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04: typedef struct { __u8 data[528]; // Data + spare -} yramdisk_Page; +} yramdisk_page; typedef struct { - yramdisk_Page page[32]; // The pages in the block + yramdisk_page page[32]; // The pages in the block -} yramdisk_Block; +} yramdisk_block; typedef struct { - yramdisk_Block **block; + yramdisk_block **block; int nBlocks; -} yramdisk_Device; +} yramdisk_device; -static yramdisk_Device ramdisk; +static yramdisk_device ramdisk; -static int CheckInit(yaffs_Device *dev) +static int CheckInit(yaffs_dev_t *dev) { static int initialised = 0; @@ -80,7 +80,7 @@ static int CheckInit(yaffs_Device *dev) ramdisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024); - ramdisk.block = YMALLOC(sizeof(yramdisk_Block *) * ramdisk.nBlocks); + ramdisk.block = YMALLOC(sizeof(yramdisk_block *) * ramdisk.nBlocks); if(!ramdisk.block) return 0; @@ -91,13 +91,13 @@ static int CheckInit(yaffs_Device *dev) for(i=0; i useNANDECC = 1; // force on useNANDECC which gets faked. + //dev->use_nand_ecc = 1; // force on use_nand_ecc which gets faked. // This saves us doing ECC checks. return YAFFS_OK;