From 0d3e7d4463aa77694c1238b5dca74856b47f3e23 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 12 Oct 2022 12:01:07 +0200 Subject: [PATCH] libc: Document errno.h --- libs/libc/include/errno.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libs/libc/include/errno.h b/libs/libc/include/errno.h index ddff34c4..8efcc4b7 100644 --- a/libs/libc/include/errno.h +++ b/libs/libc/include/errno.h @@ -1,15 +1,16 @@ #ifndef _ERRNO_H #define _ERRNO_H +/* The last error encountered during a call to a library or system function. */ extern int errno; -#define EPERM 1 -#define ENOENT 2 -#define EBADF 9 -#define ENOMEM 12 -#define EISDIR 21 -#define EINVAL 22 -#define EMFILE 24 -#define ENOSYS 38 +#define EPERM 1 // Operation not permitted +#define ENOENT 2 // No such file or directory +#define EBADF 9 // Bad file descriptor +#define ENOMEM 12 // Cannot allocate memory +#define EISDIR 21 // Is a directory +#define EINVAL 22 // Invalid argument +#define EMFILE 24 // Too many open files +#define ENOSYS 38 // Function not implemented #endif \ No newline at end of file