LibC: Add errno for unknown error

This commit is contained in:
Bananymous 2023-09-28 12:06:17 +03:00
parent f7097398ca
commit 0b11d76576
3 changed files with 7 additions and 0 deletions

View File

@ -91,6 +91,8 @@ __BEGIN_DECLS
#define ENOTBLK 82 #define ENOTBLK 82
#define EEXISTS 83 #define EEXISTS 83
#define EUNKNOWN 0xFF
#define errno __errno #define errno __errno
extern int __errno; extern int __errno;

View File

@ -11,6 +11,9 @@ __BEGIN_DECLS
#define TTY_FLAG_ENABLE_OUTPUT 1 #define TTY_FLAG_ENABLE_OUTPUT 1
#define TTY_FLAG_ENABLE_INPUT 2 #define TTY_FLAG_ENABLE_INPUT 2
#define POWER_SHUTDOWN 0
#define POWER_REBOOT 1
/* /*
fildes: refers to valid tty device fildes: refers to valid tty device
command: one of TTY_CMD_* definitions command: one of TTY_CMD_* definitions

View File

@ -173,6 +173,7 @@ const char* strerrorname_np(int error)
case EXDEV: return "EXDEV"; case EXDEV: return "EXDEV";
case EEXISTS: return "EEXISTS"; case EEXISTS: return "EEXISTS";
case ENOTBLK: return "ENOTBLK"; case ENOTBLK: return "ENOTBLK";
case EUNKNOWN: return "EUNKNOWN";
} }
errno = EINVAL; errno = EINVAL;
@ -267,6 +268,7 @@ const char* strerrordesc_np(int error)
case EXDEV: return "Cross-device link."; case EXDEV: return "Cross-device link.";
case EEXISTS: return "File exists"; case EEXISTS: return "File exists";
case ENOTBLK: return "Block device required"; case ENOTBLK: return "Block device required";
case EUNKNOWN: return "Unknown error";
} }
errno = EINVAL; errno = EINVAL;