libc: Add support for EEXIST, ENOTDIR, ENOSPC, ENOTSUP and EPIPE to strerror()

This commit is contained in:
apio 2022-10-16 17:24:58 +02:00
parent d2e2883a79
commit e1e86ab889
2 changed files with 6 additions and 1 deletions

View File

@ -11,7 +11,7 @@ extern int errno;
#define ENOMEM 12 // Cannot allocate memory #define ENOMEM 12 // Cannot allocate memory
#define EFAULT 14 // Bad address #define EFAULT 14 // Bad address
#define EEXIST 17 // File exists #define EEXIST 17 // File exists
#define ENOTDIR 10 // Not a directory #define ENOTDIR 20 // Not a directory
#define EISDIR 21 // Is a directory #define EISDIR 21 // Is a directory
#define EINVAL 22 // Invalid argument #define EINVAL 22 // Invalid argument
#define EMFILE 24 // Too many open files #define EMFILE 24 // Too many open files

View File

@ -201,6 +201,11 @@ extern "C"
case EISDIR: return "Is a directory"; case EISDIR: return "Is a directory";
case ENOEXEC: return "Exec format error"; case ENOEXEC: return "Exec format error";
case EFAULT: return "Bad address"; case EFAULT: return "Bad address";
case EEXIST: return "File exists";
case ENOTDIR: return "Not a directory";
case ENOSPC: return "No space left on device";
case ENOTSUP: return "Operation not supported";
case EPIPE: return "Broken pipe";
case 0: return "Success"; case 0: return "Success";
default: return "Unknown error"; default: return "Unknown error";
} }