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