Merge in yaffsfs.c changes
[yaffs2.git] / direct / basic-test / yaffs_osglue.c
index 995871397497861ec82c23ea2fce77a107a86564..4c2e442033f8cc03be314a90295798f70148613f 100644 (file)
@@ -19,7 +19,7 @@
 #include "yaffs_nandemul2k.h"
 #include "yaffs_norif1.h"
 #include "yaffs_trace.h"
-
+#include <assert.h>
 
 #include <errno.h>
 
@@ -37,6 +37,13 @@ int yaffsfs_GetLastError(void)
        return yaffsfs_lastError;
 }
 
+int yaffsfs_CheckMemRegion(const void *addr, size_t size, int writeable)
+{
+       if(!addr)
+               return -1;
+       return 0;
+}
+
 
 #ifdef CONFIG_YAFFS_USE_PTHREADS
 #include <pthread.h>
@@ -75,7 +82,7 @@ void yaffsfs_LockInit(void)
 
 u32 yaffsfs_CurrentTime(void)
 {
-       return 0;
+       return time(NULL);
 }
 
 
@@ -108,3 +115,9 @@ void yaffsfs_OSInitialisation(void)
 }
 
 
+void yaffs_bug_fn(const char *file_name, int line_no)
+{
+       printf("yaffs bug detected %s:%d\n",
+               file_name, line_no);
+       assert(0);
+}