errno: add strerror function
This commit is contained in:
parent
69ad7ea220
commit
9aea93214a
2 changed files with 20 additions and 8 deletions
|
|
@ -1,5 +1,4 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef _ERRNO_H_
|
||||
#define _ERRNO_H_
|
||||
|
||||
|
|
@ -8,12 +7,6 @@
|
|||
#define EINVAL 3
|
||||
#define EBADF 4
|
||||
|
||||
static const char *errno_str[] = {
|
||||
[0] = "Success",
|
||||
[ENOMEM] = "Out of memory",
|
||||
[ENOENT] = "No such file or directory",
|
||||
[EINVAL] = "Invalid argument",
|
||||
[EBADF] = "Bad file descriptor",
|
||||
};
|
||||
const char *strerror(int errnum);
|
||||
|
||||
#endif /* _ERRNO_H_ */
|
||||
|
|
|
|||
Loading…
Reference in a new issue