errno: add strerror function

This commit is contained in:
Michael Shaw 2023-10-19 22:13:09 -04:00
commit 9aea93214a
2 changed files with 20 additions and 8 deletions

View file

@ -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_ */