• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Author: Karl MacMillan <kmacmillan@mentalrootkit.com> */
2 
3 #ifndef __sepol_errno_h__
4 #define __sepol_errno_h__
5 
6 #include <errno.h>
7 #include <sys/cdefs.h>
8 
9 __BEGIN_DECLS
10 
11 #define SEPOL_OK             0
12 
13 /* These first error codes are defined for compatibility with
14  * previous version of libsepol. In the future, custome error
15  * codes that don't map to system error codes should be defined
16  * outside of the range of system error codes.
17  */
18 #define SEPOL_ERR            -1
19 #define SEPOL_ENOTSUP        -2  /* feature not supported in module language */
20 #define SEPOL_EREQ           -3  /* requirements not met */
21 
22 /* Error codes that map to system error codes */
23 #define SEPOL_ENOMEM         -ENOMEM
24 #define SEPOL_ERANGE         -ERANGE
25 #define SEPOL_EEXIST         -EEXIST
26 #define SEPOL_ENOENT         -ENOENT
27 
28 __END_DECLS
29 #endif
30