error.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Error codes. They are negative since a few system calls, such as READ, can
  2. * either return a positive number indicating success, or an error code.
  3. */
  4. #define NERROR 34
  5. #define OK 0
  6. #define ERROR -1
  7. #define EPERM -1
  8. #define ENOENT -2
  9. #define ESRCH -3
  10. #define EINTR -4
  11. #define EIO -5
  12. #define ENXIO -6
  13. #define E2BIG -7
  14. #define ENOEXEC -8
  15. #define EBADF -9
  16. #define ECHILD -10
  17. #define EAGAIN -11
  18. #define ENOMEM -12
  19. #define EACCES -13
  20. #define EFAULT -14
  21. #define ENOTBLK -15
  22. #define EBUSY -16
  23. #define EEXIST -17
  24. #define EXDEV -18
  25. #define ENODEV -19
  26. #define ENOTDIR -20
  27. #define EISDIR -21
  28. #define EINVAL -22
  29. #define ENFILE -23
  30. #define EMFILE -24
  31. #define ENOTTY -25
  32. #define ETXTBSY -26
  33. #define EFBIG -27
  34. #define ENOSPC -28
  35. #define ESPIPE -29
  36. #define EROFS -30
  37. #define EMLINK -31
  38. #define EPIPE -32
  39. #define EDOM -33
  40. #define ERANGE -34
  41. #define E_LOCKED -101
  42. #define E_BAD_CALL -102
  43. #define E_LONG_STRING -103
  44. #define EOF -104 /* End Of File - used by drivers */
  45. /* The following error codes are generated by the kernel itself. */
  46. #define E_BAD_DEST -1 /* destination address illegal */
  47. #define E_BAD_SRC -2 /* source address illegal */
  48. #define E_TRY_AGAIN -3 /* can't send-- tables full */
  49. #define E_OVERRUN -4 /* interrupt for task that is not waiting */
  50. #define E_BAD_BUF -5 /* message buf outside caller's addr space */
  51. #define E_TASK -6 /* can't send to task */
  52. #define E_NO_MESSAGE -7 /* RECEIVE failed: no message present */
  53. #define E_NO_PERM -8 /* ordinary users can't send to tasks */
  54. #define E_BAD_FCN -9 /* only valid fcns are SEND, RECEIVE, BOTH */
  55. #define E_BAD_ADDR -10 /* bad address given to utility routine */
  56. #define E_BAD_PROC -11 /* bad proc number given to utility */