/*
- * 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-2010 Aleph One Ltd.
+ * for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
* 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"
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;
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));
}
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);
}