errno.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2008
  3. * The President and Fellows of Harvard College.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. * 3. Neither the name of the University nor the names of its contributors
  14. * may be used to endorse or promote products derived from this software
  15. * without specific prior written permission.
  16. *
  17. * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND
  18. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20. * ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE
  21. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27. * SUCH DAMAGE.
  28. */
  29. #ifndef _KERN_ERRNO_H_
  30. #define _KERN_ERRNO_H_
  31. /*
  32. * If you change this, be sure to make appropriate corresponding changes
  33. * to kern/errmsg.h as well. You might also want to change the man page
  34. * for errno to document the new error.
  35. *
  36. * This has been changed relative to OS/161 1.x to make the grouping
  37. * more logical.
  38. *
  39. * Also note that this file has to work from assembler, so it should
  40. * contain only symbolic constants.
  41. */
  42. #define ENOSYS 1 /* No such system call */
  43. #define EUNIMP 2 /* Unimplemented feature */
  44. #define ENOMEM 3 /* Out of memory */
  45. #define EAGAIN 4 /* Operation would block */
  46. #define EINTR 5 /* Interrupted system call */
  47. #define EFAULT 6 /* Bad memory reference */
  48. #define ENAMETOOLONG 7 /* String too long */
  49. #define EINVAL 8 /* Invalid argument */
  50. #define EPERM 9 /* Operation not permitted */
  51. #define EACCES 10 /* Permission denied */
  52. #define EMPROC 11 /* Too many processes */
  53. #define ENPROC 12 /* Too many processes in system */
  54. #define ENOEXEC 13 /* File is not executable */
  55. #define E2BIG 14 /* Argument list too long */
  56. #define ESRCH 15 /* No such process */
  57. #define ECHILD 16 /* No child processes */
  58. #define ENOTDIR 17 /* Not a directory */
  59. #define EISDIR 18 /* Is a directory */
  60. #define ENOENT 19 /* No such file or directory */
  61. #define ELOOP 20 /* Too many levels of symbolic links */
  62. #define ENOTEMPTY 21 /* Directory not empty */
  63. #define EEXIST 22 /* File or object exists */
  64. #define EMLINK 23 /* Too many hard links */
  65. #define EXDEV 24 /* Cross-device link */
  66. #define ENODEV 25 /* No such device */
  67. #define ENXIO 26 /* Device not available */
  68. #define EBUSY 27 /* Device or resource busy */
  69. #define EMFILE 28 /* Too many open files */
  70. #define ENFILE 29 /* Too many open files in system */
  71. #define EBADF 30 /* Bad file number */
  72. #define EIOCTL 31 /* Invalid or inappropriate ioctl */
  73. #define EIO 32 /* Input/output error */
  74. #define ESPIPE 33 /* Illegal seek */
  75. #define EPIPE 34 /* Broken pipe */
  76. #define EROFS 35 /* Read-only file system */
  77. #define ENOSPC 36 /* No space left on device */
  78. #define EDQUOT 37 /* Disc quota exceeded */
  79. #define EFBIG 38 /* File too large */
  80. #define EFTYPE 39 /* Invalid file type or format */
  81. #define EDOM 40 /* Argument out of range */
  82. #define ERANGE 41 /* Result out of range */
  83. #define EILSEQ 42 /* Invalid multibyte character sequence */
  84. #define ENOTSOCK 43 /* Not a socket */
  85. #define EISSOCK 44 /* Is a socket */
  86. #define EISCONN 45 /* Socket is already connected */
  87. #define ENOTCONN 46 /* Socket is not connected */
  88. #define ESHUTDOWN 47 /* Socket has been shut down */
  89. #define EPFNOSUPPORT 48 /* Protocol family not supported */
  90. #define ESOCKTNOSUPPORT 49 /* Socket type not supported */
  91. #define EPROTONOSUPPORT 50 /* Protocol not supported */
  92. #define EPROTOTYPE 51 /* Protocol wrong type for socket */
  93. #define EAFNOSUPPORT 52 /* Address family not supported by protocol family */
  94. #define ENOPROTOOPT 53 /* Protocol option not available */
  95. #define EADDRINUSE 54 /* Address already in use */
  96. #define EADDRNOTAVAIL 55 /* Cannot assign requested address */
  97. #define ENETDOWN 56 /* Network is down */
  98. #define ENETUNREACH 57 /* Network is unreachable */
  99. #define EHOSTDOWN 58 /* Host is down */
  100. #define EHOSTUNREACH 59 /* Host is unreachable */
  101. #define ECONNREFUSED 60 /* Connection refused */
  102. #define ETIMEDOUT 61 /* Connection timed out */
  103. #define ECONNRESET 62 /* Connection reset by peer */
  104. #define EMSGSIZE 63 /* Message too large */
  105. #define ENOTSUP 64 /* Threads operation not supported */
  106. #endif /* _KERN_ERRNO_H_ */