kolibrios-fun/programs/develop/ktcc/trunk/libc/string/strerror.c
siemargl ace23ebbe2 libc testsuite + fixes
git-svn-id: svn://kolibrios.org@6433 a494cfbc-eb01-0410-851d-a64ba20cac60
2016-05-19 12:15:22 +00:00

60 lines
1.2 KiB
C

#include <string.h>
char* strerror(int err)
{
char *msg;
switch(err)
{
case 0:
msg = "success";
break;
case -1:
msg = "end of file";
break;
case -2:
msg = "function is not supported for the given file system";
break;
case -3:
msg = "unknown file system";
break;
case -5:
msg = "file not found";
break;
case -6:
msg = "end of file, EOF";
break;
case -7:
msg = "pointer lies outside of application memory";
break;
case -8:
msg = "disk is full";
break;
case -9:
msg = "file system error";
break;
case -10:
msg = "access denied";
break;
case -11:
msg = "device error";
break;
case -12:
msg = "file system requires more memory";
break;
case -30:
msg = "not enough memory";
break;
case -31:
msg = "file is not executable";
break;
case -32:
msg = "too many processes";
break;
default:
msg = "unknown error";
break;
}
return msg;
}