2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
4 * Copyright (C) 2002-2007 Aleph One Ltd.
5 * for Toby Churchill Ltd and Brightstar Engineering
7 * Created by Charles Manning <charles@aleph1.co.uk>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License version 2.1 as
11 * published by the Free Software Foundation.
13 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
17 * ydirectenv.h: Environment wrappers for YAFFS direct.
20 #ifndef __YDIRECTENV_H__
21 #define __YDIRECTENV_H__
25 #include "devextras.h"
32 #define YUCHAR unsigned char
34 #define yaffs_strcpy(a,b) strcpy(a,b)
35 #define yaffs_strncpy(a,b,c) strncpy(a,b,c)
36 #define yaffs_strlen(s) strlen(s)
37 #define yaffs_sprintf sprintf
38 #define yaffs_toupper(a) toupper(a)
43 #define Y_INLINE inline
46 #define YMALLOC(x) malloc(x)
47 #define YFREE(x) free(x)
48 #define YMALLOC_ALT(x) malloc(x)
49 #define YFREE_ALT(x) free(x)
51 #define YMALLOC_DMA(x) malloc(x)
53 #define YYIELD() do {} while(0)
57 //#define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s))
58 //#define YALERT(s) YINFO(s)
63 #define TOUT(p) printf p
66 #define YAFFS_LOSTNFOUND_NAME "lost+found"
67 #define YAFFS_LOSTNFOUND_PREFIX "obj"
68 //#define YPRINTF(x) printf x
72 #define Y_CURRENT_TIME yaffsfs_CurrentTime()
73 #define Y_TIME_CONVERT(x) x
75 #define YAFFS_ROOT_MODE 0666
76 #define YAFFS_LOSTNFOUND_MODE 0666
78 #define yaffs_SumCompare(x,y) ((x) == (y))
79 #define yaffs_strcmp(a,b) strcmp(a,b)