yaffs: Speed up test script
[yaffs2.git] / direct / yaffs_fileem.c
index 82957863ea3958949f43f35d8d135a02d079c056..90c8f9e3f65dfd1a751bddaaefbaa328fa867ae4 100644 (file)
@@ -1,24 +1,26 @@
 /*
- * 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 YAFFS nand emulation on a file.
-// THis is only intended as test code to test persistence etc.
+/*
+ * This provides a YAFFS nand emulation on a file.
+ * This is only intended as test code to test persistence etc.
+ */
 
-const char *yaffs_flashif_c_version = "$Id: yaffs_fileem.c,v 1.1 2004-11-03 08:29:28 charles Exp $";
+const char *yaffs_flashif_c_version = "$Id: yaffs_fileem.c,v 1.7 2010-02-18 01:18:04 charles Exp $";
 
 
 #include "yportenv.h"
+#include "yaffs_trace.h"
 
 #include "yaffs_flashif.h"
 #include "yaffs_guts.h"
@@ -82,7 +84,7 @@ static int  CheckInit(yaffs_Device *dev)
        
        filedisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024);
        
-       filedisk.handle = open("yaffsemfile", O_RDWR | O_CREAT, S_IREAD | S_IWRITE);
+       filedisk.handle = open("emfile-512-0", O_RDWR | O_CREAT, S_IREAD | S_IWRITE);
        
        if(filedisk.handle < 0)
        {
@@ -208,8 +210,6 @@ int yflash_EraseBlockInNAND(yaffs_Device *dev, int blockNumber)
 
 int yflash_InitialiseNAND(yaffs_Device *dev)
 {
-       dev->useNANDECC = 1; // force on useNANDECC which gets faked. 
-                                                // This saves us doing ECC checks.
        
        return YAFFS_OK;
 }