2efd08e2d7236c550e7fe65bb328b577fec060ce
[yaffs2.git] / direct / timothy_tests / quick_tests / lib.h
1 /*
2  * YAFFS: Yet another Flash File System . A NAND-flash specific file system. 
3  *
4  * Copyright (C) 2002-2010 Aleph One Ltd.
5  *   for Toby Churchill Ltd and Brightstar Engineering
6  *
7  * Created by Timothy Manning <timothy@yaffs.net>
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 #ifndef _lib_h__
17 #define _lib_h__
18
19 #include <stdio.h>
20 #include <string.h>
21
22 #define EXIT_ON_ERROR 0
23 #define PRINT_LEVEL 2   //This sets the level of detail which is printed. There are 3 levels 0,1,2 and 3  
24                         //0 just prints the number of tests passed and failed.
25                         //1 is the basic print level. it will print the details of a failed test.
26                         //2 will print if a test passes and cleans. 
27
28 #define YAFFS_MOUNT_POINT "/yaffs2/"
29 #define FILE_NAME "foo"
30 #define FILE_SIZE 10
31
32 #define FILE_MODE (S_IREAD | S_IWRITE)
33 #define FILE_SIZE_TRUNCATED 100
34 #define FILE_TEXT "file foo "   /* keep space at end of string */
35 #define FILE_TEXT_NBYTES 10
36
37 /* warning do not define anything as FILE because there seems to be a conflict with stdio.h */ 
38 #define FILE_PATH "/yaffs2/foo"
39
40 void join_paths(char *path1,char *path2,char *new_path );
41 void print_message(char *message,char print_level);
42 #endif