X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftest-framework%2Ftimothy_tests%2Flinux_tests%2Flib.h;fp=direct%2Ftest-framework%2Ftimothy_tests%2Flinux_tests%2Flib.h;h=fa0cfbe281a669c5907c8a8b6394d1d7c1a4fdfc;hp=0000000000000000000000000000000000000000;hb=e5daa72b0083831ab762a650860687fe7d25d6b3;hpb=a78bce6f4a7042fa153ab32d2bb263ecf7d27b66 diff --git a/direct/test-framework/timothy_tests/linux_tests/lib.h b/direct/test-framework/timothy_tests/linux_tests/lib.h new file mode 100644 index 0000000..fa0cfbe --- /dev/null +++ b/direct/test-framework/timothy_tests/linux_tests/lib.h @@ -0,0 +1,46 @@ +/* + * 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 Timothy Manning + * + * 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 __lib_h__ +#define __lib_h__ +#include +#include +#include +#include + +#define NAME_RANGE 10 +#define ROOT_PATH "/mnt/y/" +#define FILE_NAME_LENGTH 3 +#define HEAD 0 +#define TAIL 1 + +typedef struct node_temp{ + char *string; + struct node_temp *next; +}node; + +int get_exit_on_error(void); +void set_exit_on_error(int val); +int delete_linked_list(node *head_node); +node * linked_list_add_node(int pos,node *head_node); +int random_int(void); +char * generate_random_string(unsigned int length); +void get_error_linux(void); +void check_function(int output); +void print_message(char print_level, char *message); +void set_print_level(int new_level); +int get_print_level(void); +void node_print_pointers(node *current_node); +#endif