errno: add ENOTEMPTY for rmdir()

This commit is contained in:
Lephenixnoir 2021-12-30 18:18:54 +01:00
parent 937b7bfb63
commit dbfefe5172
Signed by untrusted user: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
2 changed files with 35 additions and 33 deletions

View File

@ -9,22 +9,23 @@ extern "C" {
threads are supported. */
extern int errno;
#define EDOM 1 /* Outside of domain of math function. */
#define EILSEQ 2 /* Illegal multi-byte character sequence. */
#define ERANGE 3 /* Range error during text-to-numeric conversion. */
#define EACCES 4 /* File access denied. */
#define EEXIST 5 /* File already exists. */
#define EINVAL 6 /* Invalid argument in general; lots of uses. */
#define ENFILE 7 /* Out of file descriptors. */
#define ENOENT 8 /* File or folder does not exist. */
#define ENOMEM 9 /* System ran out of memory (RAM). */
#define EDQUOT 10 /* Out of inodes or memory space. */
#define ENOSPC 11 /* No space left on device. */
#define ENOTSUP 12 /* Operation not supported. */
#define EBADF 13 /* Invalid file descriptor. */
#define ESPIPE 14 /* File descriptor is unable to seek. */
#define EISDIR 15 /* File descriptor is a directory. */
#define ENOTDIR 16 /* File descriptor is not a directory. */
#define EDOM 1 /* Outside of domain of math function. */
#define EILSEQ 2 /* Illegal multi-byte character sequence. */
#define ERANGE 3 /* Range error during text-to-numeric conversion. */
#define EACCES 4 /* File access denied. */
#define EEXIST 5 /* File already exists. */
#define EINVAL 6 /* Invalid argument in general; lots of uses. */
#define ENFILE 7 /* Out of file descriptors. */
#define ENOENT 8 /* File or folder does not exist. */
#define ENOMEM 9 /* System ran out of memory (RAM). */
#define EDQUOT 10 /* Out of inodes or memory space. */
#define ENOSPC 11 /* No space left on device. */
#define ENOTSUP 12 /* Operation not supported. */
#define EBADF 13 /* Invalid file descriptor. */
#define ESPIPE 14 /* File descriptor is unable to seek. */
#define EISDIR 15 /* File descriptor is a directory. */
#define ENOTDIR 16 /* File descriptor is not a directory. */
#define ENOTEMPTY 17 /* Directory is not empty. */
#ifdef __cplusplus
}

View File

@ -2,23 +2,24 @@
#include <errno.h>
static char *errno_strings [] = {
[0] = "Success",
[EDOM] = "Numerical argument out of domain",
[EILSEQ] = "Invalid or incomplete multibyte or wide character",
[ERANGE] = "Numerical result out of range",
[EACCES] = "Permission denied",
[EEXIST] = "File exists",
[EINVAL] = "Invalid argument",
[ENFILE] = "Too many open files in system",
[ENOENT] = "No such file or directory",
[ENOMEM] = "Cannot allocate memory",
[EDQUOT] = "Disk quota exceeded",
[ENOSPC] = "No space left on device",
[ENOTSUP] = "Operation not supported",
[EBADF] = "Bad file descriptor",
[ESPIPE] = "Illegal seek",
[EISDIR] = "Is a directory",
[ENOTDIR] = "Not a directory",
[0] = "Success",
[EDOM] = "Numerical argument out of domain",
[EILSEQ] = "Invalid or incomplete multibyte or wide character",
[ERANGE] = "Numerical result out of range",
[EACCES] = "Permission denied",
[EEXIST] = "File exists",
[EINVAL] = "Invalid argument",
[ENFILE] = "Too many open files in system",
[ENOENT] = "No such file or directory",
[ENOMEM] = "Cannot allocate memory",
[EDQUOT] = "Disk quota exceeded",
[ENOSPC] = "No space left on device",
[ENOTSUP] = "Operation not supported",
[EBADF] = "Bad file descriptor",
[ESPIPE] = "Illegal seek",
[EISDIR] = "Is a directory",
[ENOTDIR] = "Not a directory",
[ENOTEMPTY] = "Directory not empty",
};
char *strerror(int e)