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:
16
libc/include/errno.h
Normal file
16
libc/include/errno.h
Normal 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
|
||||
@@ -19,4 +19,6 @@ char* strncpy(char* __restrict, const char* __restrict, size_t);
|
||||
|
||||
char* strstr(const char*, const char*);
|
||||
|
||||
char* strerror(int);
|
||||
|
||||
__END_DECLS
|
||||
Reference in New Issue
Block a user