Minor reorginization and additional #defines / enums
[akaros.git] / inc / error.h
1 /* See COPYRIGHT for copyright information. */
2
3 #ifndef ROS_INC_ERROR_H
4 #define ROS_INC_ERROR_H
5
6 #define TRUE    1
7 #define FALSE   0
8
9 typedef enum {
10         E_FAIL          =       -1,
11         E_SUCCESS       =       0,
12 } error_t;
13
14 // Kernel error codes -- keep in sync with list in lib/printfmt.c.
15 #define E_UNSPECIFIED   1       // Unspecified or unknown problem
16 #define E_BAD_ENV               2       // Environment doesn't exist or otherwise
17                                                         // cannot be used in requested action
18 #define E_INVAL                 3       // Invalid parameter
19 #define E_NO_MEM                4       // Request failed due to memory shortage
20 #define E_NO_FREE_ENV   5       // Attempt to create a new environment beyond
21                                                         // the maximum allowed
22 #define E_FAULT                 6       // Memory fault
23 #define MAXERROR                6
24
25 #endif  // !ROS_INC_ERROR_H */