yaffs direct: Move yaffs error string function to diferent directory
authorCharles Manning <cdhmanning@gmail.com>
Fri, 3 Dec 2010 01:50:57 +0000 (14:50 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Fri, 3 Dec 2010 01:50:57 +0000 (14:50 +1300)
This was in the python directory but is generally handy so move it into
the yaffs direct direcotory.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/python/Makefile
direct/python/yaffs_error_converter.h [deleted file]
direct/python/yaffs_python_helper.c
direct/timothy_tests/quick_tests/Makefile
direct/timothy_tests/quick_tests/quick_tests.h
direct/yaffs_error.c [moved from direct/python/yaffs_error_converter.c with 97% similarity]
direct/yaffsfs.h

index 6e0c5fd0baa6a21f029896ef10c7d55891858b7e..4a541856e40e071f814026ef7407f74c8c59a083 100644 (file)
@@ -41,10 +41,11 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o\
                 yaffs_norif1.o  ynorsim.o \
                 yaffs_bitmap.o \
                 yaffs_verify.o \
-                yaffs_yaffs1.o yaffs_yaffs2.o 
+                yaffs_yaffs1.o yaffs_yaffs2.o \
+                yaffs_error.o
 
 
-YAFFSLIBOBJS  = $(COMMONTESTOBJS) yaffs_python_helper.o yaffs_error_converter.o
+YAFFSLIBOBJS  = $(COMMONTESTOBJS) yaffs_python_helper.o
 
 
 
@@ -65,7 +66,8 @@ YAFFSDIRECTSYMLINKS =  yaffsfs.c yaffsfs.h yaffscfg.h yaffs_osglue.h  ydirectenv
                       yaffs_flashif.c yaffs_flashif.h yaffs_flashif2.h yaffs_list.h \
                       yaffs_nandif.c yaffs_nandif.h yaffs_qsort.c yaffs_nandemul2k.h \
                       yportenv.h yaffs_attribs.c \
-                      yaffs_hweight.c yaffs_hweight.h
+                      yaffs_hweight.c yaffs_hweight.h \
+                      yaffs_error.c
 
 DIRECTEXTRASYMLINKS =   yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
                         yaffs_fileem.c yaffs_norif1.c yaffs_norif1.h \
diff --git a/direct/python/yaffs_error_converter.h b/direct/python/yaffs_error_converter.h
deleted file mode 100644 (file)
index 8ff76d2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
- *
- * Copyright (C) 2002-2010 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
- *
- * Created by Timothy Manning <timothy@yaffs.net>
- *
- * 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 __error_handler_h__
-#define __error_handler_h__
-#include <stdio.h>
-
-#include "yaffsfs.h"
-#include "yportenv.h"
-
-const char * yaffs_error_to_str(int err);
-#endif
index 7c2c7e06dca623085597ca9f407a55d2ce3655ec..333ad586d6c2f846a04b2dee021266928f34f0d2 100644 (file)
@@ -22,7 +22,6 @@
  
 #include "yaffsfs.h"
 #include "yaffs_trace.h"
-#include "yaffs_error_converter.h"
 
 int simulate_power_failure;
 int random_seed;
index 22a772d96f09491b6ec588b5bbe98127469062b9..f798ce91c54d4b7a48bc23fc6b4bc57c2e023727 100644 (file)
@@ -41,7 +41,8 @@ COMMONTESTOBJS = yaffscfg2k.o yaffs_osglue.o yaffs_hweight.o \
                 yaffs_bitmap.o \
                 yaffs_yaffs1.o \
                 yaffs_yaffs2.o \
-                yaffs_verify.o
+                yaffs_verify.o \
+                yaffs_error.o
 
 #               yaffs_checkptrwtest.o\
 
@@ -114,10 +115,7 @@ TESTFILES =        quick_tests.o lib.o \
 
 YAFFSTESTOBJS  = $(COMMONTESTOBJS) $(TESTFILES)
 
-PYTONOSYMLINKS = yaffs_error_converter.c yaffs_error_converter.h
-PYTHONOBJS = yaffs_error_converter.o
-
-ALLOBJS = $(sort $(YAFFSTESTOBJS)) $(PYTHONOBJS)
+ALLOBJS = $(sort $(YAFFSTESTOBJS))
 
 YAFFSSYMLINKS = yaffs_ecc.c yaffs_ecc.h yaffs_guts.c yaffs_guts.h yaffs_tagscompat.c yaffs_tagscompat.h \
           yaffs_packedtags1.c yaffs_packedtags1.h yaffs_packedtags2.c yaffs_packedtags2.h \
@@ -137,7 +135,8 @@ YAFFSDIRECTSYMLINKS =  yaffsfs.c yaffs_flashif.h yaffs_flashif2.h\
                       yaffs_nandemul2k.h yaffs_list.h \
                       yaffs_attribs.c yaffs_osglue.h \
                       yaffs_nandif.c yaffs_nandif.h yportenv.h \
-                      yaffs_hweight.h yaffs_hweight.c
+                      yaffs_hweight.h yaffs_hweight.c \
+                      yaffs_error.c
 
 
 DIRECTEXTRASYMLINKS =  yaffscfg2k.c yaffs_fileem2k.c yaffs_fileem2k.h\
index 78ec211066b11f13cef64fe7d5bbf0c727490c03..bee341c930fc7d700a020a4e9883d4cb7de31ec8 100644 (file)
 #include "test_yaffs_dup_EBADF.h"
 
 #include "yaffsfs.h"
-#include "yaffs_error_converter.h"
 #include "lib.h"
 
 
similarity index 97%
rename from direct/python/yaffs_error_converter.c
rename to direct/yaffs_error.c
index c7eb17ca8e904eb9130e6971391a1c59c3448667..6757eec83cc3a352233e974e0d44841c9bff12e0 100644 (file)
@@ -11,7 +11,7 @@
  * published by the Free Software Foundation.
  */
 
-#include "yaffs_error_converter.h"
+#include "yaffsfs.h"
 
 struct error_entry {
   int code;
index 6eb30efca65e38b1609b7c0d6e25dff76b49892d..29d81fcd47bade17629b09d6d28cb6092a15ba71 100644 (file)
@@ -173,13 +173,15 @@ void yaffs_add_device(struct yaffs_dev *dev);
 
 int yaffs_start_up(void);
 int yaffsfs_GetLastError(void);
-int yaffs_set_error(int error);
+
 /* Function to get the last error */
 int yaffs_get_error(void);
+const char * yaffs_error_to_str(int err);
 
 /* Function only for debugging */
 void * yaffs_getdev(const YCHAR *path);
 int yaffs_dump_dev(const YCHAR *path);
+int yaffs_set_error(int error);
 
 /* Trace control functions */
 unsigned  yaffs_set_trace(unsigned tm);
@@ -187,3 +189,25 @@ unsigned  yaffs_get_trace(void);
 #endif
 
 
+/*
+ * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
+ *
+ * Copyright (C) 2002-2010 Aleph One Ltd.
+ *   for Toby Churchill Ltd and Brightstar Engineering
+ *
+ * Created by Timothy Manning <timothy@yaffs.net>
+ *
+ * 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 __error_handler_h__
+#define __error_handler_h__
+#include <stdio.h>
+
+#include "yaffsfs.h"
+#include "yportenv.h"
+#endif