Fix copyright
[yaffs2.git] / direct / test-framework / 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-2018 Aleph One Ltd.
5  *
6  * Created by Timothy Manning <timothy@yaffs.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License version 2.1 as
10  * published by the Free Software Foundation.
11  *
12  * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL.
13  */
14
15 #ifndef __lib_h__
16 #define __lib_h__
17 #include <errno.h>
18 #include <stdio.h>
19 #include <string.h>
20 #include <stdlib.h>
21
22 #define NAME_RANGE 10
23 #define ROOT_PATH "/mnt/y/"
24 #define FILE_NAME_LENGTH 3
25 #define HEAD 0
26 #define TAIL 1
27
28 typedef struct node_temp{
29         char *string;
30         struct node_temp *next; 
31 }node;
32
33 int get_exit_on_error(void);
34 void set_exit_on_error(int val);
35 int delete_linked_list(node *head_node);
36 node * linked_list_add_node(int pos,node *head_node);
37 int random_int(void);
38 char * generate_random_string(unsigned int length);
39 void get_error_linux(void);
40 void check_function(int output);
41 void print_message(char print_level, char *message);
42 void set_print_level(int new_level);
43 int get_print_level(void);
44 void node_print_pointers(node *current_node);
45 #endif