Kernel+LibC: Add some errno codes

Kernel now returns ENOMEM and other errnos, so we dont have to write
error messages
This commit is contained in:
Bananymous
2023-03-02 21:10:44 +02:00
parent 90a7268e5a
commit 52aa98ba25
16 changed files with 87 additions and 31 deletions

16
libc/include/errno.h Normal file
View File

@@ -0,0 +1,16 @@
#pragma once
#include <sys/cdefs.h>
#define ENOMEM 1
#define EINVAL 2
#define ENOTDIR 3
#define EISDIR 4
#define ENOENT 5
#define EIO 6
__BEGIN_DECLS
extern int errno;
__END_DECLS

View File

@@ -19,4 +19,6 @@ char* strncpy(char* __restrict, const char* __restrict, size_t);
char* strstr(const char*, const char*);
char* strerror(int);
__END_DECLS