projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure mode is sane
[yaffs2.git]
/
yportenv.h
diff --git
a/yportenv.h
b/yportenv.h
index 77c5b058391f9c745e5c811e44e9cc563c863b8c..e8b9d097c35a978238720b3f2f3caaa81108b640 100644
(file)
--- a/
yportenv.h
+++ b/
yportenv.h
@@
-15,28
+15,29
@@
*
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*
*
* Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
*
- * $Id: yportenv.h,v 1.
3 2004-11-16 02:36:15
charles Exp $
+ * $Id: yportenv.h,v 1.
11 2006-05-21 09:39:12
charles Exp $
*
*/
*
*/
-
+
#ifndef __YPORTENV_H__
#define __YPORTENV_H__
#ifndef __YPORTENV_H__
#define __YPORTENV_H__
-
#if defined CONFIG_YAFFS_WINCE
#include "ywinceenv.h"
#elif defined __KERNEL__
#if defined CONFIG_YAFFS_WINCE
#include "ywinceenv.h"
#elif defined __KERNEL__
+#include "moduleconfig.h"
-
-// Linux kernel
-#include "linux/kernel.h"
-#include "linux/version.h"
-#include "linux/mm.h"
-#include "linux/string.h"
-#include "linux/slab.h"
+/* Linux kernel */
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/version.h>
+#include <linux/mm.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
#define YCHAR char
#define YUCHAR unsigned char
#define YCHAR char
#define YUCHAR unsigned char
@@
-52,9
+53,15
@@
#define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj"
#define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj"
-/
/#define YPRINTF(x) printk x
+/
* #define YPRINTF(x) printk x */
#define YMALLOC(x) kmalloc(x,GFP_KERNEL)
#define YFREE(x) kfree(x)
#define YMALLOC(x) kmalloc(x,GFP_KERNEL)
#define YFREE(x) kfree(x)
+#define YMALLOC_ALT(x) vmalloc(x)
+#define YFREE_ALT(x) vfree(x)
+#define YMALLOC_DMA(x) YMALLOC(x)
+
+// KR - added for use in scan so processes aren't blocked indefinitely.
+#define YYIELD() schedule()
#define YAFFS_ROOT_MODE 0666
#define YAFFS_LOSTNFOUND_MODE 0666
#define YAFFS_ROOT_MODE 0666
#define YAFFS_LOSTNFOUND_MODE 0666
@@
-71,18
+78,17
@@
#define yaffs_strcmp(a,b) strcmp(a,b)
#define TENDSTR "\n"
#define yaffs_strcmp(a,b) strcmp(a,b)
#define TENDSTR "\n"
-#define TSTR(x) KERN_
DEBU
G x
+#define TSTR(x) KERN_
WARNIN
G x
#define TOUT(p) printk p
#define TOUT(p) printk p
-
#elif defined CONFIG_YAFFS_DIRECT
#elif defined CONFIG_YAFFS_DIRECT
-/
/ Direct interface
+/
* Direct interface */
#include "ydirectenv.h"
#elif defined CONFIG_YAFFS_UTIL
#include "ydirectenv.h"
#elif defined CONFIG_YAFFS_UTIL
-/
/ Stuff for YAFFS utilities
+/
* Stuff for YAFFS utilities */
#include "stdlib.h"
#include "stdio.h"
#include "stdlib.h"
#include "stdio.h"
@@
-92,7
+98,8
@@
#define YMALLOC(x) malloc(x)
#define YFREE(x) free(x)
#define YMALLOC(x) malloc(x)
#define YFREE(x) free(x)
-
+#define YMALLOC_ALT(x) malloc(x)
+#define YFREE_ALT(x) free(x)
#define YCHAR char
#define YUCHAR unsigned char
#define YCHAR char
#define YUCHAR unsigned char
@@
-105,19
+112,16
@@
#define Y_INLINE inline
#define Y_INLINE inline
-//#define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s))
-//#define YALERT(s) YINFO(s)
-
+/* #define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s)) */
+/* #define YALERT(s) YINFO(s) */
#define TENDSTR "\n"
#define TSTR(x) x
#define TOUT(p) printf p
#define TENDSTR "\n"
#define TSTR(x) x
#define TOUT(p) printf p
-
#define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj"
#define YAFFS_LOSTNFOUND_NAME "lost+found"
#define YAFFS_LOSTNFOUND_PREFIX "obj"
-//#define YPRINTF(x) printf x
-
+/* #define YPRINTF(x) printf x */
#define YAFFS_ROOT_MODE 0666
#define YAFFS_LOSTNFOUND_MODE 0666
#define YAFFS_ROOT_MODE 0666
#define YAFFS_LOSTNFOUND_MODE 0666
@@
-126,11
+130,10
@@
#define yaffs_strcmp(a,b) strcmp(a,b)
#else
#define yaffs_strcmp(a,b) strcmp(a,b)
#else
-/
/ Should have specified a configuration type
+/
* Should have specified a configuration type */
#error Unknown configuration
#error Unknown configuration
-#endif
-
+#endif
extern unsigned yaffs_traceMask;
extern unsigned yaffs_traceMask;
@@
-147,16
+150,16
@@
extern unsigned yaffs_traceMask;
#define YAFFS_TRACE_BUFFERS 0x00000400
#define YAFFS_TRACE_NANDACCESS 0x00000800
#define YAFFS_TRACE_GC_DETAIL 0x00001000
#define YAFFS_TRACE_BUFFERS 0x00000400
#define YAFFS_TRACE_NANDACCESS 0x00000800
#define YAFFS_TRACE_GC_DETAIL 0x00001000
+#define YAFFS_TRACE_SCAN_DEBUG 0x00002000
+#define YAFFS_TRACE_MTD 0x00004000
+#define YAFFS_TRACE_CHECKPOINT 0x00008000
#define YAFFS_TRACE_ALWAYS 0x40000000
#define YAFFS_TRACE_BUG 0x80000000
#define YAFFS_TRACE_ALWAYS 0x40000000
#define YAFFS_TRACE_BUG 0x80000000
-#define T(mask,p) do{ if((mask) & (yaffs_traceMask | YAFFS_TRACE_ERROR)) TOUT(p);} while(0)
-
+#define T(mask,p) do{ if((mask) & (yaffs_traceMask | YAFFS_TRACE_ERROR)) TOUT(p);} while(0)
#ifndef CONFIG_YAFFS_WINCE
#define YBUG() T(YAFFS_TRACE_BUG,(TSTR("==>> yaffs bug: " __FILE__ " %d" TENDSTR),__LINE__))
#endif
#endif
#ifndef CONFIG_YAFFS_WINCE
#define YBUG() T(YAFFS_TRACE_BUG,(TSTR("==>> yaffs bug: " __FILE__ " %d" TENDSTR),__LINE__))
#endif
#endif
-
-