22f6bc33968c83b20d10e8c174bc37a707c70609
[yaffs2.git] / direct / timothy_tests / linux_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 #include <errno.h>
19 #include <stdio.h>
20 #include <string.h>
21 #include "yaffsfs.h"
22
23 #define NAME_RANGE 10
24 #define ROOT_PATH "/mnt/y/"
25 #define FILE_NAME_LENGTH 3
26 #define HEAD 0
27 #define TAIL 1
28
29 typedef struct node_temp{
30         char *string;
31         struct node_temp *next; 
32 }node;
33
34 int delete_linked_list(node *head_node);
35 node * linked_list_add_node(int pos,node *head_node);
36 unsigned int random_int(void);
37 char * generate_random_string(unsigned int length);
38 void get_error_linux(void);
39 void check_function(int output);
40 void print_message(char print_level, char *message);
41 void set_print_level(int new_level);
42 int get_print_level(void);
43 void node_print_pointers(node *current_node);
44 #endif