From 93207820b3633b55694c16bc582cf1007e4e4598 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 21 Oct 2022 18:34:01 +0200 Subject: [PATCH] libc: Add a few errors to errno.h As well as ino_t, which I forgot in the fstat() commit :) --- kernel/include/std/errno.h | 2 ++ libs/libc/include/errno.h | 2 ++ libs/libc/include/sys/types.h | 3 +++ 3 files changed, 7 insertions(+) diff --git a/kernel/include/std/errno.h b/kernel/include/std/errno.h index 0d9c4b73..c2c59830 100644 --- a/kernel/include/std/errno.h +++ b/kernel/include/std/errno.h @@ -3,6 +3,7 @@ #define EPERM 1 #define ENOENT 2 #define ESRCH 3 +#define EINTR 4 #define ENOEXEC 8 #define EBADF 9 #define ENOMEM 12 @@ -12,6 +13,7 @@ #define EISDIR 21 #define EINVAL 22 #define EMFILE 24 +#define ENOTTY 25 #define ENOSPC 28 #define ENOSYS 38 #define ENOTSUP 95 \ No newline at end of file diff --git a/libs/libc/include/errno.h b/libs/libc/include/errno.h index 37487b9d..78868490 100644 --- a/libs/libc/include/errno.h +++ b/libs/libc/include/errno.h @@ -7,6 +7,7 @@ extern int errno; #define EPERM 1 // Operation not permitted #define ENOENT 2 // No such file or directory #define ESRCH 3 // No such process +#define EINTR 4 // Interrupted system call. Not implemented. #define ENOEXEC 8 // Exec format error #define EBADF 9 // Bad file descriptor #define ENOMEM 12 // Cannot allocate memory @@ -16,6 +17,7 @@ extern int errno; #define EISDIR 21 // Is a directory #define EINVAL 22 // Invalid argument #define EMFILE 24 // Too many open files +#define ENOTTY 25 // Inappropriate ioctl for device #define ENOSPC 28 // No space left on device #define EPIPE 32 // Broken pipe. Not implemented. #define ENOSYS 38 // Function not implemented diff --git a/libs/libc/include/sys/types.h b/libs/libc/include/sys/types.h index 421f1e45..60304dd4 100644 --- a/libs/libc/include/sys/types.h +++ b/libs/libc/include/sys/types.h @@ -16,4 +16,7 @@ typedef long int off_t; /* The type of a file's mode. */ typedef unsigned short mode_t; +/* The type of a filesystem inode. */ +typedef unsigned long ino_t; + #endif \ No newline at end of file