diff options
author | Kevin | 2014-11-15 09:58:27 +0800 |
---|---|---|
committer | Kevin | 2014-11-15 09:58:27 +0800 |
commit | 392e8802486cb573b916e746010e141a75f507e6 (patch) | |
tree | 50029aca02c81f087b90336e670b44e510782330 /ANDROID_3.4.5/fs/yaffs2/yportenv.h | |
download | FOSSEE-netbook-kernel-source-392e8802486cb573b916e746010e141a75f507e6.tar.gz FOSSEE-netbook-kernel-source-392e8802486cb573b916e746010e141a75f507e6.tar.bz2 FOSSEE-netbook-kernel-source-392e8802486cb573b916e746010e141a75f507e6.zip |
init android origin source code
Diffstat (limited to 'ANDROID_3.4.5/fs/yaffs2/yportenv.h')
-rw-r--r-- | ANDROID_3.4.5/fs/yaffs2/yportenv.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ANDROID_3.4.5/fs/yaffs2/yportenv.h b/ANDROID_3.4.5/fs/yaffs2/yportenv.h new file mode 100644 index 00000000..81834254 --- /dev/null +++ b/ANDROID_3.4.5/fs/yaffs2/yportenv.h @@ -0,0 +1,70 @@ +/* + * 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 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 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 __YPORTENV_LINUX_H__ +#define __YPORTENV_LINUX_H__ + +#include <linux/version.h> +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/sched.h> +#include <linux/string.h> +#include <linux/slab.h> +#include <linux/vmalloc.h> +#include <linux/xattr.h> +#include <linux/list.h> +#include <linux/types.h> +#include <linux/fs.h> +#include <linux/stat.h> +#include <linux/sort.h> +#include <linux/bitops.h> + +#define YCHAR char +#define YUCHAR unsigned char +#define _Y(x) x + +#define YAFFS_LOSTNFOUND_NAME "lost+found" +#define YAFFS_LOSTNFOUND_PREFIX "obj" + + +#define YAFFS_ROOT_MODE 0755 +#define YAFFS_LOSTNFOUND_MODE 0700 + +#define Y_CURRENT_TIME CURRENT_TIME.tv_sec +#define Y_TIME_CONVERT(x) (x).tv_sec + +#define compile_time_assertion(assertion) \ + ({ int x = __builtin_choose_expr(assertion, 0, (void)0); (void) x; }) + + +#ifndef Y_DUMP_STACK +#define Y_DUMP_STACK() dump_stack() +#endif + +#define yaffs_trace(msk, fmt, ...) do { \ + if(yaffs_trace_mask & (msk)) \ + printk(KERN_DEBUG "yaffs: " fmt "\n", ##__VA_ARGS__); \ +} while(0) + +#ifndef YBUG +#define YBUG() do {\ + yaffs_trace(YAFFS_TRACE_BUG,\ + "bug " __FILE__ " %d",\ + __LINE__);\ + Y_DUMP_STACK();\ +} while (0) +#endif + +#endif |