The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
error.h File Reference
#include "common/stdint.h"

Go to the source code of this file.

Enumerations

enum  kerr_t {
  KERR_OK = 0 , KERR_NOMEM = -1 , KERR_IO = -2 , KERR_NOTFOUND = -3 ,
  KERR_PERM = -4 , KERR_INVAL = -5 , KERR_BUSY = -6 , KERR_NOSPC = -7 ,
  KERR_RANGE = -8 , KERR_EXIST = -9 , KERR_ISDIR = -10 , KERR_NOTDIR = -11 ,
  KERR_PIPE = -12 , KERR_NOENT = -13 , KERR_FAULT = -14 , KERR_NOTEMPTY = -15 ,
  KERR_LOOP = -16 , KERR_NOEXEC = -17 , KERR_FBIG = -18
}
 unified kernel error codes. More...

Functions

const char * status_to_str (kerr_t err)
 convert a kerr_t to a human-readable string for debug output.

Enumeration Type Documentation

◆ kerr_t

enum kerr_t

unified kernel error codes.

all kernel subsystems return kerr_t from fallible operations. KERR_OK (0) indicates success, all other values indicate failure. values are negative to allow direct mapping to userspace errno at the syscall boundary.

Enumerator
KERR_OK 
KERR_NOMEM 
KERR_IO 
KERR_NOTFOUND 
KERR_PERM 
KERR_INVAL 
KERR_BUSY 
KERR_NOSPC 
KERR_RANGE 
KERR_EXIST 
KERR_ISDIR 
KERR_NOTDIR 
KERR_PIPE 
KERR_NOENT 
KERR_FAULT 
KERR_NOTEMPTY 
KERR_LOOP 
KERR_NOEXEC 
KERR_FBIG 

Function Documentation

◆ status_to_str()

const char * status_to_str ( kerr_t err)

convert a kerr_t to a human-readable string for debug output.

Parameters
errthe error code.
Returns
static string describing the error.