2 * YAFFS: Yet another FFS. A NAND-flash specific file system.
4 * Copyright (C) 2002-2010 Aleph One Ltd.
5 * for Toby Churchill Ltd and Brightstar Engineering
7 * Created by Timothy Manning <timothy@yaffs.net>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
15 #ifndef __message_buffer__
16 #define __message_buffer__
22 #define APPEND_MESSAGE 1
23 #define DO_NOT_APPEND_MESSAGE 0
24 #define PRINT_ALL -1 /*this is used to print all of the messages in a buffer*/
25 #define BUFFER_MESSAGE_LENGTH 60 /*number of char in message*/
26 #define BUFFER_SIZE 50 /*number of messages in buffer*/
27 #define MESSAGE_LEVEL_ERROR 0
28 #define MESSAGE_LEVEL_BASIC_TASKS 1
29 typedef struct buffer_template{
30 char message[BUFFER_SIZE][BUFFER_MESSAGE_LENGTH];
33 char message_level[BUFFER_SIZE];
35 #include "error_handler.h" /*include this for the debug level*/
38 void print_buffer(buffer *p_Buffer,int number_of_messages_to_print); /*print messages in the buffer*/
39 /*wrapper functions for add_to_buffer_root_function*/
40 void add_to_buffer(buffer *p_Buffer, char *message,char message_level,char print);
41 void append_to_buffer(buffer *p_Buffer, char *message,char message_level,char print);
43 void add_to_buffer_root_function(buffer *p_Buffer, char *message,char message_level,char append,char print);