Home | History | Annotate | Download | only in sepol
      1 /* Author: Karl MacMillan <kmacmillan (at) mentalrootkit.com> */
      2 
      3 #ifndef __sepol_errno_h__
      4 #define __sepol_errno_h__
      5 
      6 #include <errno.h>
      7 
      8 #ifdef __cplusplus
      9 extern "C" {
     10 #endif
     11 
     12 #define SEPOL_OK             0
     13 
     14 /* These first error codes are defined for compatibility with
     15  * previous version of libsepol. In the future, custome error
     16  * codes that don't map to system error codes should be defined
     17  * outside of the range of system error codes.
     18  */
     19 #define SEPOL_ERR            -1
     20 #define SEPOL_ENOTSUP        -2  /* feature not supported in module language */
     21 #define SEPOL_EREQ           -3  /* requirements not met */
     22 
     23 /* Error codes that map to system error codes */
     24 #define SEPOL_ENOMEM         -ENOMEM
     25 #define SEPOL_ERANGE         -ERANGE
     26 #define SEPOL_EEXIST         -EEXIST
     27 #define SEPOL_ENOENT         -ENOENT
     28 
     29 #ifdef __cplusplus
     30 }
     31 #endif
     32 
     33 #endif
     34