My Kernel v0.1.0
Collaboration diagram for Errors:

Macros

#define IS_ERR(_x)   ((native_t)(_x) > ((u32) - E_TOTAL_COUNT))
 Check if an integer can be interpreted as an error.
 

Enumerations

enum  error {
  E_SUCCESS , E_PERM = 1 , E_NOENT = 2 , E_IO = 5 ,
  E_WOULD_BLOCK = 11 , E_NOMEM = 12 , E_BUSY = 16 , E_EXIST = 17 ,
  E_NODEV = 19 , E_NOT_DIRECTORY = 20 , E_IS_DIRECTORY = 21 , E_INVAL = 22 ,
  E_NFILE = 23 , E_MFILE = 24 , E_SEEK_PIPE = 29 , E_READ_ONLY_FS = 30 ,
  E_NAME_TOO_LONG = 36 , E_NOT_IMPLEMENTED = 38 , E_BAD_FD = 81 , E_NOT_SOCKET = 88 ,
  E_DEST_ADDR_REQUIRED = 89 , E_MSG_SIZE = 90 , E_PROTOTYPE = 91 , E_NO_PROTO_OPT = 92 ,
  E_PROTO_NOT_SUPPORTED = 93 , E_SOCK_T_NOT_SUPPORTED = 94 , E_NOT_SUPPORTED = 95 , E_PF_NOT_SUPPORTED = 96 ,
  E_AF_NOT_SUPPORTED = 97 , E_ADDR_IN_USE = 98 , E_ADDR_NOT_AVAILABLE = 99 , E_NET_DOWN = 100 ,
  E_NET_UNREACHABLE = 101 , E_NO_BUFFER_SPACE = 105 , E_IS_CONNECTED = 106 , E_NOT_CONNECTED = 107 ,
  E_TOTAL_COUNT
}
 All the error types used in ths project. More...
 

Functions

static ALWAYS_INLINE void * PTR_ERR (error_t err)
 Construct a pointer containing info about an error.
 
static ALWAYS_INLINE error_t ERR_FROM_PTR (const void *ptr)
 Extract the error value contained inside a pointer

 
const char * err_to_str (error_t)
 Retrieve the string description of an error code.
 

Detailed Description

Errors

These are the error types, functions and handlers used all throughout the project.

If a new interface must return an error value it should, as much as possible, use or update what's defined inside this file.

Enumeration Type Documentation

◆ error

enum error
Enumerator
E_SUCCESS 

No error.

E_PERM 

Operation not permitted.

E_NOENT 

Entry not found.

E_IO 

I/O error.

E_WOULD_BLOCK 

Resource temporarily unavailable.

E_NOMEM 

Out of memory.

E_BUSY 

Device or resource busy.

E_EXIST 

File exists.

E_NODEV 

No such device.

E_NOT_DIRECTORY 

Is not a directory.

E_IS_DIRECTORY 

Is a directory.

E_INVAL 

Invalid argument.

E_NFILE 

File table overflow.

E_MFILE 

Too many opened files.

E_SEEK_PIPE 

Illegal seek.

E_READ_ONLY_FS 

Read-only file system.

E_NAME_TOO_LONG 

File name too long.

E_NOT_IMPLEMENTED 

Function not implemented.

E_BAD_FD 

File descriptor in bad state.

E_NOT_SOCKET 

Socket operation on non-socket.

E_DEST_ADDR_REQUIRED 

Destination address required.

E_MSG_SIZE 

Message too long.

E_PROTOTYPE 

Protocol wrong type for socket.

E_NO_PROTO_OPT 

Protocol not available.

E_PROTO_NOT_SUPPORTED 

Protocol not supported.

E_SOCK_T_NOT_SUPPORTED 

Socket type not supported.

E_NOT_SUPPORTED 

Operation not supported.

E_PF_NOT_SUPPORTED 

Protocol family not supported.

E_AF_NOT_SUPPORTED 

Address family not supported by protocol.

E_ADDR_IN_USE 

Address already in use.

E_ADDR_NOT_AVAILABLE 

Cannot assign requested address.

E_NET_DOWN 

Network is down.

E_NET_UNREACHABLE 

Network is unreachable.

E_NO_BUFFER_SPACE 

Not enough buffer space.

E_IS_CONNECTED 

Transport endpoint is already connected.

E_NOT_CONNECTED 

Transport endpoint is not connected.

E_TOTAL_COUNT 

Total number of error codes, only used as a reference.