errno.h 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Copyright (c) 1984-1999, 2012 Wind River Systems, Inc.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /*
  7. * Copyright (c) 1982, 1986 Regents of the University of California.
  8. * All rights reserved. The Berkeley software License Agreement
  9. * specifies the terms and conditions for redistribution.
  10. *
  11. * @(#)errno.h 7.1 (Berkeley) 6/4/86
  12. */
  13. /**
  14. * @file
  15. * @brief System error numbers
  16. */
  17. #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ERRNO_H_
  18. #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ERRNO_H_
  19. /**
  20. * @brief System error numbers
  21. * Error codes returned by functions.
  22. * Includes a list of those defined by IEEE Std 1003.1-2017.
  23. * @defgroup system_errno Error numbers
  24. * @ingroup c_std_lib
  25. * @{
  26. */
  27. #include <sys/errno_private.h>
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #define errno (*z_errno())
  32. #define EPERM 1 /**< Not owner */
  33. #define ENOENT 2 /**< No such file or directory */
  34. #define ESRCH 3 /**< No such context */
  35. #define EINTR 4 /**< Interrupted system call */
  36. #define EIO 5 /**< I/O error */
  37. #define ENXIO 6 /**< No such device or address */
  38. #define E2BIG 7 /**< Arg list too long */
  39. #define ENOEXEC 8 /**< Exec format error */
  40. #define EBADF 9 /**< Bad file number */
  41. #define ECHILD 10 /**< No children */
  42. #define EAGAIN 11 /**< No more contexts */
  43. #define ENOMEM 12 /**< Not enough core */
  44. #define EACCES 13 /**< Permission denied */
  45. #define EFAULT 14 /**< Bad address */
  46. #define ENOTBLK 15 /**< Block device required */
  47. #define EBUSY 16 /**< Mount device busy */
  48. #define EEXIST 17 /**< File exists */
  49. #define EXDEV 18 /**< Cross-device link */
  50. #define ENODEV 19 /**< No such device */
  51. #define ENOTDIR 20 /**< Not a directory */
  52. #define EISDIR 21 /**< Is a directory */
  53. #define EINVAL 22 /**< Invalid argument */
  54. #define ENFILE 23 /**< File table overflow */
  55. #define EMFILE 24 /**< Too many open files */
  56. #define ENOTTY 25 /**< Not a typewriter */
  57. #define ETXTBSY 26 /**< Text file busy */
  58. #define EFBIG 27 /**< File too large */
  59. #define ENOSPC 28 /**< No space left on device */
  60. #define ESPIPE 29 /**< Illegal seek */
  61. #define EROFS 30 /**< Read-only file system */
  62. #define EMLINK 31 /**< Too many links */
  63. #define EPIPE 32 /**< Broken pipe */
  64. #define EDOM 33 /**< Argument too large */
  65. #define ERANGE 34 /**< Result too large */
  66. #define ENOMSG 35 /**< Unexpected message type */
  67. #define EDEADLK 45 /**< Resource deadlock avoided */
  68. #define ENOLCK 46 /**< No locks available */
  69. #define ENOSTR 60 /**< STREAMS device required */
  70. #define ENODATA 61 /**< Missing expected message data */
  71. #define ETIME 62 /**< STREAMS timeout occurred */
  72. #define ENOSR 63 /**< Insufficient memory */
  73. #define EPROTO 71 /**< Generic STREAMS error */
  74. #define EBADMSG 77 /**< Invalid STREAMS message */
  75. #define ENOSYS 88 /**< Function not implemented */
  76. #define ENOTEMPTY 90 /**< Directory not empty */
  77. #define ENAMETOOLONG 91 /**< File name too long */
  78. #define ELOOP 92 /**< Too many levels of symbolic links */
  79. #define EOPNOTSUPP 95 /**< Operation not supported on socket */
  80. #define EPFNOSUPPORT 96 /**< Protocol family not supported */
  81. #define ECONNRESET 104 /**< Connection reset by peer */
  82. #define ENOBUFS 105 /**< No buffer space available */
  83. #define EAFNOSUPPORT 106 /**< Addr family not supported */
  84. #define EPROTOTYPE 107 /**< Protocol wrong type for socket */
  85. #define ENOTSOCK 108 /**< Socket operation on non-socket */
  86. #define ENOPROTOOPT 109 /**< Protocol not available */
  87. #define ESHUTDOWN 110 /**< Can't send after socket shutdown */
  88. #define ECONNREFUSED 111 /**< Connection refused */
  89. #define EADDRINUSE 112 /**< Address already in use */
  90. #define ECONNABORTED 113 /**< Software caused connection abort */
  91. #define ENETUNREACH 114 /**< Network is unreachable */
  92. #define ENETDOWN 115 /**< Network is down */
  93. #define ETIMEDOUT 116 /**< Connection timed out */
  94. #define EHOSTDOWN 117 /**< Host is down */
  95. #define EHOSTUNREACH 118 /**< No route to host */
  96. #define EINPROGRESS 119 /**< Operation now in progress */
  97. #define EALREADY 120 /**< Operation already in progress */
  98. #define EDESTADDRREQ 121 /**< Destination address required */
  99. #define EMSGSIZE 122 /**< Message size */
  100. #define EPROTONOSUPPORT 123 /**< Protocol not supported */
  101. #define ESOCKTNOSUPPORT 124 /**< Socket type not supported */
  102. #define EADDRNOTAVAIL 125 /**< Can't assign requested address */
  103. #define ENETRESET 126 /**< Network dropped connection on reset */
  104. #define EISCONN 127 /**< Socket is already connected */
  105. #define ENOTCONN 128 /**< Socket is not connected */
  106. #define ETOOMANYREFS 129 /**< Too many references: can't splice */
  107. #define ENOTSUP 134 /**< Unsupported value */
  108. #define EILSEQ 138 /**< Illegal byte sequence */
  109. #define EOVERFLOW 139 /**< Value overflow */
  110. #define ECANCELED 140 /**< Operation canceled */
  111. #define EWOULDBLOCK EAGAIN /**< Operation would block */
  112. /**
  113. * @}
  114. */
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_ERRNO_H_ */