OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [error/] [current/] [include/] [codes.h] - Blame information for rev 865

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_ERROR_CODES_H
2
#define CYGONCE_ERROR_CODES_H
3
/*===========================================================================
4
//
5
//      codes.h
6
//
7
//      Common error code definitions
8
//
9
//===========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later
18
// version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
28
//
29
// As a special exception, if other files instantiate templates or use
30
// macros or inline functions from this file, or you compile this file
31
// and link it with other works to produce a work based on this file,
32
// this file does not by itself cause the resulting work to be covered by
33
// the GNU General Public License. However the source code for this file
34
// must still be made available in accordance with section (3) of the GNU
35
// General Public License v2.
36
//
37
// This exception does not invalidate any other reasons why a work based
38
// on this file might be covered by the GNU General Public License.
39
// -------------------------------------------
40
// ####ECOSGPLCOPYRIGHTEND####
41
//===========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):    jlarmour
45
// Contributors: jlarmour
46
// Date:         2000-04-14
47
// Purpose:      To provide a common set of error codes
48
// Description:  This provides a common set of error codes that all
49
//               packages can agree on. It doesn't preclude them defining
50
//               their own error return system, but this is a preferable
51
//               system to use to help error support be as general as
52
//               possible.
53
//
54
//               We try and conform to the ANSI/POSIX error code format,
55
//               namely starting with the character 'E'
56
//
57
// Usage:        #include <cyg/error/codes.h>
58
//
59
//               Example:
60
//
61
//               err=myfun();
62
//               if (err != ENOERR)
63
//               {
64
//                 str=strerror(err);
65
//                 printf("myfun returned error: %s\n", str);
66
//               }
67
//               else ....
68
//
69
//####DESCRIPTIONEND####
70
//
71
//=========================================================================*/
72
 
73
/* CONFIGURATION */
74
 
75
#include <pkgconf/error.h>          // Configuration header
76
 
77
#ifdef __cplusplus
78
extern "C" {
79
#endif
80
 
81
/* TYPE DEFINITIONS */
82
 
83
/* A type for error codes which may be useful to explain the purpose of
84
 * a variable or return code. It shows that it contains an error code
85
 * of the type defined below */
86
 
87
typedef int Cyg_ErrNo;
88
 
89
 
90
/* CONSTANT DEFINITIONS */
91
 
92
/* If adding to this list, you must also update strerror() with its text
93
 * If there is a common error of the same purpose on Unix, try and use its
94
 * name and number. If not, use one above 200 to prevent future conflicts
95
 *
96
 * Do not use negative numbers, so that functions can return positive on
97
 * success and -ESOMETHING on error, and it all works consistently.
98
*/
99
 
100
#define ENOERR           0     /* No error */
101
#define EPERM            1     /* Not permitted */
102
#define ENOENT           2     /* No such entity */
103
#define ESRCH            3     /* No such process */
104
#define EINTR            4     /* Operation interrupted */
105
#define EIO              5     /* I/O error */
106
#define EBADF            9     /* Bad file handle */
107
#define EAGAIN           11    /* Try again later */
108
#define EWOULDBLOCK      EAGAIN
109
#define ENOMEM           12    /* Out of memory */
110
#define EBUSY            16    /* Resource busy */
111
#define EXDEV            18    /* Cross-device link */    
112
#define ENODEV           19    /* No such device */
113
#define ENOTDIR          20    /* Not a directory */
114
#define EISDIR           21    /* Is a directory */    
115
#define EINVAL           22    /* Invalid argument */
116
#define ENFILE           23    /* Too many open files in system */
117
#define EMFILE           24    /* Too many open files */
118
#define EFBIG            27    /* File too large */    
119
#define ENOSPC           28    /* No space left on device */
120
#define ESPIPE           29    /* Illegal seek */
121
#define EROFS            30    /* Read-only file system */    
122
#define EDOM             33    /* Argument to math function outside valid */
123
                               /* domain */
124
#define ERANGE           34    /* Math result cannot be represented */
125
#define EDEADLK          35    /* Resource deadlock would occur */
126
#define EDEADLOCK        EDEADLK
127
#define ENOSYS           38    /* Function not implemented */
128
#define ENAMETOOLONG     60    /* File name too long */    
129
#define ENOTEMPTY        66    /* Directory not empty */
130
#define ENOTSUP          95    /* Not supported error */
131
#define EEOF             200   /* End of file reached */
132
#define ENOSUPP          201   /* Operation not supported */
133
#define EDEVNOSUPP       202   /* Device does not support this operation */
134
 
135
/* Additional errors used by networking */
136
#define ENXIO            300   /* Device not configured */
137
#define EACCES           301   /* Permission denied */
138
#define EEXIST           302   /* File exists */
139
#define ENOTTY           303   /* Inappropriate ioctl for device */
140
#define EPIPE            304   /* Broken pipe */
141
 
142
/* non-blocking and interrupt i/o */
143
#define EINPROGRESS      310   /* Operation now in progress */
144
#define EALREADY         311   /* Operation already in progress */
145
 
146
/* ipc/network software -- argument errors */
147
#define ENOTSOCK         320   /* Socket operation on non-socket */
148
#define EDESTADDRREQ     321   /* Destination address required */
149
#define EMSGSIZE         322   /* Message too long */
150
#define EPROTOTYPE       323   /* Protocol wrong type for socket */
151
#define ENOPROTOOPT      324   /* Protocol not available */
152
#define EPROTONOSUPPORT  325   /* Protocol not supported */
153
#define ESOCKTNOSUPPORT  326   /* Socket type not supported */
154
#define EOPNOTSUPP       327   /* Operation not supported */
155
#define EPFNOSUPPORT     328   /* Protocol family not supported */
156
#define EAFNOSUPPORT     329   /* Address family not supported by */
157
                               /* protocol family */
158
#define EADDRINUSE       330   /* Address already in use */
159
#define EADDRNOTAVAIL    331   /* Can't assign requested address */
160
 
161
/* ipc/network software -- operational errors */
162
#define ENETDOWN         350   /* Network is down */
163
#define ENETUNREACH      351   /* Network is unreachable */
164
#define ENETRESET        352   /* Network dropped connection on reset */
165
#define ECONNABORTED     353   /* Software caused connection abort */
166
#define ECONNRESET       354   /* Connection reset by peer */
167
#define ENOBUFS          355   /* No buffer space available */
168
#define EISCONN          356   /* Socket is already connected */
169
#define ENOTCONN         357   /* Socket is not connected */
170
#define ESHUTDOWN        358   /* Can't send after socket shutdown */
171
#define ETOOMANYREFS     359   /* Too many references: can't splice */
172
#define ETIMEDOUT        360   /* Operation timed out */
173
#define ECONNREFUSED     361   /* Connection refused */
174
 
175
#define EHOSTDOWN        364   /* Host is down */
176
#define EHOSTUNREACH     365   /* No route to host */
177
 
178
#ifdef __cplusplus
179
}   /* extern "C" */
180
#endif
181
 
182
#endif /* CYGONCE_ERROR_CODES_H multiple inclusion protection */
183
 
184
/* EOF codes.h */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.