Nut/OS  5.0.5
API Reference
errno.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1982, 1986, 1989, 1993
00003  *  The Regents of the University of California.  All rights reserved.
00004  * (c) UNIX System Laboratories, Inc.
00005  * All or some portions of this file are derived from material licensed
00006  * to the University of California by American Telephone and Telegraph
00007  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
00008  * the permission of UNIX System Laboratories, Inc.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  * 3. Neither the name of the University nor the names of its contributors
00019  *    may be used to endorse or promote products derived from this software
00020  *    without specific prior written permission.
00021  *
00022  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
00023  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00024  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00025  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
00026  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00027  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00028  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00029  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00030  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00031  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00032  * SUCH DAMAGE.
00033  *
00034  *  @(#)errno.h 8.5 (Berkeley) 1/21/94
00035  */
00036 
00037 #ifndef _ERRNO_H_
00038 
00039 #ifdef __NUT_EMULATION__
00040 //  on an emulation platform, we need to use the native errno as it might
00041 //  re-define errno (e.g. on red hat enterprise linux 3)
00042 #include <errno_orig.h>
00043 
00044 // define _ERRNO_H_ as the native system might use a different style
00045 #define _ERRNO_H_
00046 
00047 #else
00048 
00049 #define _ERRNO_H_
00050 
00051 extern int errno;           /* global error number */
00052 
00053 #define EPERM       1       /* Operation not permitted */
00054 #define ENOENT      2       /* No such file or directory */
00055 #define ESRCH       3       /* No such process */
00056 #define EINTR       4       /* Interrupted system call */
00057 #define EIO     5       /* Input/output error */
00058 #define ENXIO       6       /* Device not configured */
00059 #define E2BIG       7       /* Argument list too long */
00060 #define ENOEXEC     8       /* Exec format error */
00061 #define EBADF       9       /* Bad file descriptor */
00062 #define ECHILD      10      /* No child processes */
00063 #define EDEADLK     11      /* Resource deadlock avoided */
00064                     /* 11 was EAGAIN */
00065 #define ENOMEM      12      /* Cannot allocate memory */
00066 #define EACCES      13      /* Permission denied */
00067 #define EFAULT      14      /* Bad address */
00068 #define ENOTBLK     15      /* Block device required */
00069 #define EBUSY       16      /* Device busy */
00070 #define EEXIST      17      /* File exists */
00071 #define EXDEV       18      /* Cross-device link */
00072 #define ENODEV      19      /* Operation not supported by device */
00073 #define ENOTDIR     20      /* Not a directory */
00074 #define EISDIR      21      /* Is a directory */
00075 #define EINVAL      22      /* Invalid argument */
00076 #define ENFILE      23      /* Too many open files in system */
00077 #define EMFILE      24      /* Too many open files */
00078 #define ENOTTY      25      /* Inappropriate ioctl for device */
00079 #define ETXTBSY     26      /* Text file busy */
00080 #define EFBIG       27      /* File too large */
00081 #define ENOSPC      28      /* No space left on device */
00082 #define ESPIPE      29      /* Illegal seek */
00083 #define EROFS       30      /* Read-only file system */
00084 #define EMLINK      31      /* Too many links */
00085 #define EPIPE       32      /* Broken pipe */
00086 
00087 /* math software */
00088 #define EDOM        33      /* Numerical argument out of domain */
00089 #define ERANGE      34      /* Result too large */
00090 
00091 /* non-blocking and interrupt i/o */
00092 #define EAGAIN      35      /* Resource temporarily unavailable */
00093 #define EWOULDBLOCK EAGAIN      /* Operation would block */
00094 #define EINPROGRESS 36      /* Operation now in progress */
00095 #define EALREADY    37      /* Operation already in progress */
00096 
00097 /* ipc/network software -- argument errors */
00098 #define ENOTSOCK    38      /* Socket operation on non-socket */
00099 #define EDESTADDRREQ    39      /* Destination address required */
00100 #define EMSGSIZE    40      /* Message too long */
00101 #define EPROTOTYPE  41      /* Protocol wrong type for socket */
00102 #define ENOPROTOOPT 42      /* Protocol not available */
00103 #define EPROTONOSUPPORT 43      /* Protocol not supported */
00104 #define ESOCKTNOSUPPORT 44      /* Socket type not supported */
00105 #define EOPNOTSUPP  45      /* Operation not supported */
00106 #define EPFNOSUPPORT    46      /* Protocol family not supported */
00107 #define EAFNOSUPPORT    47      /* Address family not supported by protocol family */
00108 #define EADDRINUSE  48      /* Address already in use */
00109 #define EADDRNOTAVAIL   49      /* Can't assign requested address */
00110 
00111 /* ipc/network software -- operational errors */
00112 #define ENETDOWN    50      /* Network is down */
00113 #define ENETUNREACH 51      /* Network is unreachable */
00114 #define ENETRESET   52      /* Network dropped connection on reset */
00115 #define ECONNABORTED    53      /* Software caused connection abort */
00116 #define ECONNRESET  54      /* Connection reset by peer */
00117 #define ENOBUFS     55      /* No buffer space available */
00118 #define EISCONN     56      /* Socket is already connected */
00119 #define ENOTCONN    57      /* Socket is not connected */
00120 #define ESHUTDOWN   58      /* Can't send after socket shutdown */
00121 #define ETOOMANYREFS    59      /* Too many references: can't splice */
00122 #define ETIMEDOUT   60      /* Operation timed out */
00123 #define ECONNREFUSED    61      /* Connection refused */
00124 
00125 #define ELOOP       62      /* Too many levels of symbolic links */
00126 #define ENAMETOOLONG    63      /* File name too long */
00127 
00128 /* should be rearranged */
00129 #define EHOSTDOWN   64      /* Host is down */
00130 #define EHOSTUNREACH    65      /* No route to host */
00131 #define ENOTEMPTY   66      /* Directory not empty */
00132 
00133 #endif
00134 
00135 #endif
00136