Updated timothy_tests/stress_tester
[yaffs2.git] / direct / test-framework / timothy_tests / stress_tester / error_handler.c
index a9152f3a2dc1c7c301fe6e3db7b6934428fb479d..ff22260c296fa591f188a9d0fac44503452fe08e 100644 (file)
@@ -1,8 +1,7 @@
 /*
  * YAFFS: Yet another FFS. A NAND-flash specific file system.
  *
- * Copyright (C) 2002-2011 Aleph One Ltd.
- *   for Toby Churchill Ltd and Brightstar Engineering
+ * Copyright (C) 2002-2018 Aleph One Ltd.
  *
  * Created by Timothy Manning <timothy@yaffs.net>
  *
@@ -15,7 +14,7 @@
  * error_handler.c contains code for checking yaffs function calls for errors.
  */
 #include "error_handler.h"
-
+#include "shared.h"
 
 typedef struct error_codes_template {
   int code;
@@ -43,9 +42,9 @@ const error_entry error_list[] = {
        { 0, NULL }
 };
 
-const char * error_to_str(int err)
+char * error_to_str(int err)
 {
-       error_entry *e = error_list;
+       error_entry const *e = error_list;
        if (err < 0) 
                err = -err;
        while(e->code && e->text){
@@ -57,10 +56,8 @@ const char * error_to_str(int err)
 }
 
 void yaffs_check_for_errors(char output, buffer *message_buffer,char error_message[],char success_message[]){
-       char dummy[10];
-       unsigned int x=0;
        int yaffs_error=-1;
-       char error_found=0;
+
        if (output==-1)
        {
                add_to_buffer(message_buffer, "\nerror##########",MESSAGE_LEVEL_ERROR,PRINT);