]> git.ipfire.org Git - people/ms/u-boot.git/blame - fs/yaffs2/ydirectenv.h
treewide: use #include <...> to include public headers
[people/ms/u-boot.git] / fs / yaffs2 / ydirectenv.h
CommitLineData
0e8cc8bd 1/*
4b070809 2 * YAFFS: Yet another Flash File System . A NAND-flash specific file system.
0e8cc8bd 3 *
753ac610 4 * Copyright (C) 2002-2011 Aleph One Ltd.
0e8cc8bd
WJ
5 * for Toby Churchill Ltd and Brightstar Engineering
6 *
7 * Created by Charles Manning <charles@aleph1.co.uk>
8 *
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.
12 *
13 * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
14 */
15
16/*
17 * ydirectenv.h: Environment wrappers for YAFFS direct.
18 */
19
20#ifndef __YDIRECTENV_H__
21#define __YDIRECTENV_H__
22
74f45b73
CM
23#include <common.h>
24#include <malloc.h>
25#include <linux/compat.h>
26
753ac610 27#include "yaffs_osglue.h"
753ac610
CM
28
29void yaffs_bug_fn(const char *file_name, int line_no);
30
0e8cc8bd 31
0e8cc8bd
WJ
32
33#define YCHAR char
34#define YUCHAR unsigned char
35#define _Y(x) x
753ac610
CM
36
37#define yaffs_strcat(a, b) strcat(a, b)
38#define yaffs_strcpy(a, b) strcpy(a, b)
39#define yaffs_strncpy(a, b, c) strncpy(a, b, c)
40#define yaffs_strnlen(s, m) strnlen(s, m)
41#ifdef CONFIG_YAFFS_CASE_INSENSITIVE
42#define yaffs_strcmp(a, b) strcasecmp(a, b)
43#define yaffs_strncmp(a, b, c) strncasecmp(a, b, c)
0e8cc8bd 44#else
753ac610
CM
45#define yaffs_strcmp(a, b) strcmp(a, b)
46#define yaffs_strncmp(a, b, c) strncmp(a, b, c)
0e8cc8bd
WJ
47#endif
48
0e8cc8bd 49
753ac610
CM
50void yaffs_qsort(void *aa, size_t n, size_t es,
51 int (*cmp)(const void *, const void *));
0e8cc8bd 52
753ac610 53#define sort(base, n, sz, cmp_fn, swp) yaffs_qsort(base, n, sz, cmp_fn)
0e8cc8bd 54
753ac610 55#define YAFFS_PATH_DIVIDERS "/"
0e8cc8bd 56
753ac610
CM
57#ifdef NO_inline
58#define inline
753ac610 59#endif
0e8cc8bd 60
753ac610
CM
61#define yaffs_trace(msk, fmt, ...) do { \
62 if (yaffs_trace_mask & (msk)) \
63 printf("yaffs: " fmt "\n", ##__VA_ARGS__); \
64} while (0)
0e8cc8bd
WJ
65
66
67#define YAFFS_LOSTNFOUND_NAME "lost+found"
68#define YAFFS_LOSTNFOUND_PREFIX "obj"
0e8cc8bd
WJ
69
70#include "yaffscfg.h"
71
72#define Y_CURRENT_TIME yaffsfs_CurrentTime()
73#define Y_TIME_CONVERT(x) x
74
753ac610 75#define YAFFS_ROOT_MODE 0666
0e8cc8bd
WJ
76#define YAFFS_LOSTNFOUND_MODE 0666
77
b5bf5cb3 78#include <linux/list.h>
753ac610
CM
79
80#include "yaffsfs.h"
0e8cc8bd
WJ
81
82#endif