errcodes.h 783 B

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