X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fmirror_tests%2Flib.c;h=e21e77d35a09426de3524f6001adadc762bf3df5;hp=558de9ab0c7b932b9fa69d977dbcffc1c304492e;hb=ae68942c23ba444fc820519ac25865ab38edc3c5;hpb=6e8abe36e3190664d26161ace6948c57f9ffda94 diff --git a/direct/timothy_tests/mirror_tests/lib.c b/direct/timothy_tests/mirror_tests/lib.c index 558de9a..e21e77d 100644 --- a/direct/timothy_tests/mirror_tests/lib.c +++ b/direct/timothy_tests/mirror_tests/lib.c @@ -42,6 +42,33 @@ void display_error(void) } +void get_error_yaffs(void) +{ + int error_code=0; + char message[30]; + message[0]='\0'; + + error_code=yaffs_get_error(); + sprintf(message,"yaffs_error code %d\n",error_code); + print_message(1,message); + sprintf(message,"error is : %s\n",yaffs_error_to_str(error_code)); + print_message(1,message); +} + +void get_error_linux(void) +{ + int error_code=0; + char message[30]; + message[0]='\0'; + + error_code=errno; + sprintf(message,"linux_error code %d\n",error_code); + print_message(1,message); + strcpy(message,"error code"); + sprintf(message,"error is : %s\n",yaffs_error_to_str(error_code)); + //perror(message); + print_message(1,message); +} void generate_random_string(char *ptr,int length_of_str){ unsigned int x; unsigned int length=((rand() %(length_of_str-3))+3); /*creates a int with the number of charecters been between 1 and 51*/