X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffs_ramdisk.c;h=0889fb23c2d531ae3092e5c7cbd65425f62d2c96;hp=b19d6cb2d12f57b083a6c6d77da0ea8eae7c5758;hb=b4a902328423692f296c9118bf6bfaa057ccc72c;hpb=2e51ed27a28a076ee9eb870ba8c0eb09b8114b01 diff --git a/direct/yaffs_ramdisk.c b/direct/yaffs_ramdisk.c index b19d6cb..0889fb2 100644 --- a/direct/yaffs_ramdisk.c +++ b/direct/yaffs_ramdisk.c @@ -1,30 +1,33 @@ /* - * YAFFS: Yet another FFS. A NAND-flash specific file system. - * yaffs_ramdisk.c: yaffs ram disk component + * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2002 Aleph One Ltd. + * Copyright (C) 2002-2007 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 General Public License version 2 as * published by the Free Software Foundation. - * */ -// This provides a rma disk under yaffs. -// NB this is not intended for NAND emulation. -// Use this with dev->useNANDECC enabled, then ECC overheads are not required. +/* + * 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. + */ -const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.1 2004-11-03 08:29:28 charles Exp $"; +const char *yaffs_ramdisk_c_version = "$Id: yaffs_ramdisk.c,v 1.6 2010-01-11 04:06:47 charles Exp $"; #include "yportenv.h" +#include "yaffs_trace.h" #include "yaffs_ramdisk.h" #include "yaffs_guts.h" #include "devextras.h" -#include "yaffs_packedtags.h" +#include "yaffs_packedtags1.h" @@ -116,7 +119,7 @@ static int CheckInit(yaffs_Device *dev) return 1; } -int yramdisk_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, yaffs_ExtendedTags *tags) +int yramdisk_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags) { int blk; int pg; @@ -136,9 +139,9 @@ int yramdisk_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __ if(tags) { - yaffs_PackedTags pt; + yaffs_PackedTags1 pt; - yaffs_PackTags(&pt,tags); + yaffs_PackTags1(&pt,tags); memcpy(&ramdisk.block[blk]->page[pg].data[512],&pt,sizeof(pt)); } @@ -167,10 +170,10 @@ int yramdisk_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 * if(tags) { - yaffs_PackedTags pt; + yaffs_PackedTags1 pt; memcpy(&pt,&ramdisk.block[blk]->page[pg].data[512],sizeof(pt)); - yaffs_UnpackTags(tags,&pt); + yaffs_UnpackTags1(tags,&pt); }