X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fdev%2Ferror_handler.c;h=a9152f3a2dc1c7c301fe6e3db7b6934428fb479d;hb=6648cbf52d6695755941ff8607fd7a0cda542e05;hp=2beca41cc533cd0c414661da07bcf8cd11d26c05;hpb=baabf1227755653121fcd9e6139636ff9245e2c4;p=yaffs2.git diff --git a/direct/timothy_tests/dev/error_handler.c b/direct/timothy_tests/dev/error_handler.c index 2beca41..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,12 +65,13 @@ 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); - exit(1); + 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);