PatchworkOS
Loading...
Searching...
No Matches
strerror.c
Go to the documentation of this file.
1
#include <
errno.h
>
2
#include <
string.h
>
3
4
#include "
common/error_strings.h
"
5
6
char
*
strerror
(
int
errnum)
7
{
8
if
(errnum >=
ERR_MAX
|| errnum < 0)
9
{
10
return
"unknown error"
;
11
}
12
else
13
{
14
return
_error_strings
[errnum];
15
}
16
}
errno.h
_error_strings
char * _error_strings[]
Definition
error_strings.c:5
error_strings.h
ERR_MAX
#define ERR_MAX
Maximum value for all error codes (not inclusive)
Definition
errno.h:732
strerror
char * strerror(int errnum)
Definition
strerror.c:6
string.h
src
libstd
functions
string
strerror.c
Generated by
1.9.8