X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fdev%2Ferror_handler.c;h=a9152f3a2dc1c7c301fe6e3db7b6934428fb479d;hb=6648cbf52d6695755941ff8607fd7a0cda542e05;hp=d1670e62b9634303a32fd8e08a7cc8bac26bea95;hpb=a5bab2056ca3c68d3e15568f81a6e1d697d23da5;p=yaffs2.git diff --git a/direct/timothy_tests/dev/error_handler.c b/direct/timothy_tests/dev/error_handler.c index d1670e6..a9152f3 100644 --- a/direct/timothy_tests/dev/error_handler.c +++ b/direct/timothy_tests/dev/error_handler.c @@ -1,7 +1,7 @@ /* * YAFFS: Yet another FFS. A NAND-flash specific file system. * - * Copyright (C) 2002-2010 Aleph One Ltd. + * Copyright (C) 2002-2011 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Timothy Manning @@ -65,13 +65,14 @@ void yaffs_check_for_errors(char output, buffer *message_buffer,char error_messa { add_to_buffer(message_buffer, "\nerror##########",MESSAGE_LEVEL_ERROR,PRINT); add_to_buffer(message_buffer, error_message,MESSAGE_LEVEL_ERROR,PRINT); - add_to_buffer(message_buffer, "error_code: ",MESSAGE_LEVEL_ERROR,PRINT); + add_to_buffer(message_buffer, "error_code: ",MESSAGE_LEVEL_ERROR,NPRINT); yaffs_error=yaffs_get_error(); - if (MESSAGE_LEVEL_ERROR<=DEBUG_LEVEL) printf("%d\n",yaffs_error); /*cannot yet add int types to buffer. this is a quick fix*/ + append_int_to_buffer(message_buffer, yaffs_error,MESSAGE_LEVEL_ERROR,PRINT); + add_to_buffer(message_buffer, error_to_str(yaffs_error),MESSAGE_LEVEL_ERROR,NPRINT); append_to_buffer(message_buffer, "\n\n",MESSAGE_LEVEL_ERROR,PRINT); - - scanf("%c",dummy); /*this line causes a segmentation fault. Need a better way of waiting for a key press*/ + quit_program(); + //scanf("%c",dummy); /*this line causes a segmentation fault. Need a better way of waiting for a key press*/ //print_buffer(message_buffer,PRINT_ALL); }