Coda Distributed File System
lib-src
rpc2
include
rpc2
errors.h
Go to the documentation of this file.
1
// clang-format off
2
/* This file was generated from errordb.txt at Thu Jan 10 15:42:30 EST 2019 */
3
/* It defines values for missing or RPC2/Coda specific errnos */
4
5
/* RPC2 converts errno values to it's own platform independent numbering
6
* - Errors returned by RPC's are platform independent.
7
* - Accommodate Coda specific errors (like VSALVAGE) as well as system errors.
8
* - Quick and easy translation of errors:
9
* a) from RPC2/Coda to system errors (typically for clients)
10
* b) from system to RPC2/Coda errors (typically for servers)
11
* c) provide a "perror" like function.
12
* - Coda servers should only return errors which all of the client
13
* platforms can handle.
14
* - If errors arrive on certain clients/servers and are not recognized
15
* a log message is printed and a default error code (4711) is returned.
16
*/
17
18
#ifndef _ERRORS_H_
19
#define _ERRORS_H_
20
21
#include <errno.h>
22
23
/* Similar to perror but also knows about locally undefined errno values */
24
const
char
*
cerror
(
int
err);
25
26
/* Offset for undefined errors to avoid collision with existing errno values */
27
#define RPC2_ERRBASE 500
28
29
/* These are strange, they were defined in errordb.txt but their network
30
* representation was set to the errno define and as such they would not be
31
* correctly transferred over the wire. I guess it is better to define them
32
* as true aliases so they are sent correctly across the wire */
33
#define VREADONLY EROFS
/* Attempt to write to a read-only volume */
34
#define VDISKFULL ENOSPC
/* Partition is full */
35
#define EWOULDBLOCK EAGAIN
/* Operation would block */
36
37
/* Translations for common UNIX errno values */
38
#ifndef EPERM
39
#define EPERM (RPC2_ERRBASE+1)
/* Operation not permitted */
40
#endif
41
#ifndef ENOENT
42
#define ENOENT (RPC2_ERRBASE+2)
/* No such file or directory */
43
#endif
44
#ifndef ESRCH
45
#define ESRCH (RPC2_ERRBASE+3)
/* No such process */
46
#endif
47
#ifndef EINTR
48
#define EINTR (RPC2_ERRBASE+4)
/* Interrupted system call */
49
#endif
50
#ifndef EIO
51
#define EIO (RPC2_ERRBASE+5)
/* Input/output error */
52
#endif
53
#ifndef ENXIO
54
#define ENXIO (RPC2_ERRBASE+6)
/* Device not configured */
55
#endif
56
#ifndef E2BIG
57
#define E2BIG (RPC2_ERRBASE+7)
/* Argument list too long */
58
#endif
59
#ifndef ENOEXEC
60
#define ENOEXEC (RPC2_ERRBASE+8)
/* Exec format error */
61
#endif
62
#ifndef EBADF
63
#define EBADF (RPC2_ERRBASE+9)
/* Bad file descriptor */
64
#endif
65
#ifndef ECHILD
66
#define ECHILD (RPC2_ERRBASE+10)
/* No child processes */
67
#endif
68
#ifndef EDEADLK
69
#define EDEADLK (RPC2_ERRBASE+11)
/* Resource deadlock avoided */
70
#endif
71
#ifndef ENOMEM
72
#define ENOMEM (RPC2_ERRBASE+12)
/* Cannot allocate memory */
73
#endif
74
#ifndef EACCES
75
#define EACCES (RPC2_ERRBASE+13)
/* Permission denied */
76
#endif
77
#ifndef EFAULT
78
#define EFAULT (RPC2_ERRBASE+14)
/* Bad address */
79
#endif
80
#ifndef ENOTBLK
81
#define ENOTBLK (RPC2_ERRBASE+15)
/* Not a block device */
82
#endif
83
#ifndef EBUSY
84
#define EBUSY (RPC2_ERRBASE+16)
/* Device busy */
85
#endif
86
#ifndef EEXIST
87
#define EEXIST (RPC2_ERRBASE+17)
/* File exists */
88
#endif
89
#ifndef EXDEV
90
#define EXDEV (RPC2_ERRBASE+18)
/* Cross-device link */
91
#endif
92
#ifndef ENODEV
93
#define ENODEV (RPC2_ERRBASE+19)
/* Operation not supported by device */
94
#endif
95
#ifndef ENOTDIR
96
#define ENOTDIR (RPC2_ERRBASE+20)
/* Not a directory */
97
#endif
98
#ifndef EISDIR
99
#define EISDIR (RPC2_ERRBASE+21)
/* Is a directory */
100
#endif
101
#ifndef EINVAL
102
#define EINVAL (RPC2_ERRBASE+22)
/* Invalid argument */
103
#endif
104
#ifndef ENFILE
105
#define ENFILE (RPC2_ERRBASE+23)
/* Too many open files in system */
106
#endif
107
#ifndef EMFILE
108
#define EMFILE (RPC2_ERRBASE+24)
/* Too many open files */
109
#endif
110
#ifndef ENOTTY
111
#define ENOTTY (RPC2_ERRBASE+25)
/* Inappropriate ioctl for device */
112
#endif
113
#ifndef ETXTBSY
114
#define ETXTBSY (RPC2_ERRBASE+26)
/* Text file busy */
115
#endif
116
#ifndef EFBIG
117
#define EFBIG (RPC2_ERRBASE+27)
/* File too large */
118
#endif
119
#ifndef ENOSPC
120
#define ENOSPC (RPC2_ERRBASE+28)
/* No space left on device */
121
#endif
122
#ifndef ESPIPE
123
#define ESPIPE (RPC2_ERRBASE+29)
/* Illegal seek */
124
#endif
125
#ifndef EROFS
126
#define EROFS (RPC2_ERRBASE+30)
/* Read-only file system */
127
#endif
128
#ifndef EMLINK
129
#define EMLINK (RPC2_ERRBASE+31)
/* Too many links */
130
#endif
131
#ifndef EPIPE
132
#define EPIPE (RPC2_ERRBASE+32)
/* Broken pipe */
133
#endif
134
#ifndef EDOM
135
#define EDOM (RPC2_ERRBASE+33)
/* Numerical argument out of domain */
136
#endif
137
#ifndef ERANGE
138
#define ERANGE (RPC2_ERRBASE+34)
/* Result too large */
139
#endif
140
#ifndef EAGAIN
141
#define EAGAIN (RPC2_ERRBASE+35)
/* Resource temporarily unavailable */
142
#endif
143
#ifndef EALREADY
144
#define EALREADY (RPC2_ERRBASE+37)
/* Operation already in progress */
145
#endif
146
#ifndef ENOSYS
147
#define ENOSYS (RPC2_ERRBASE+38)
/* Function not implemented */
148
#endif
149
#ifndef EPROTONOSUPPORT
150
#define EPROTONOSUPPORT (RPC2_ERRBASE+43)
/* Protocol not supported */
151
#endif
152
#ifndef EOPNOTSUPP
153
#define EOPNOTSUPP (RPC2_ERRBASE+45)
/* Operation not supported */
154
#endif
155
#ifndef ENOBUFS
156
#define ENOBUFS (RPC2_ERRBASE+55)
/* No buffer space available */
157
#endif
158
#ifndef ENOTCONN
159
#define ENOTCONN (RPC2_ERRBASE+57)
/* Socket is not connected */
160
#endif
161
#ifndef ESHUTDOWN
162
#define ESHUTDOWN (RPC2_ERRBASE+58)
/* Can't send after socket shutdown */
163
#endif
164
#ifndef ETOOMANYREFS
165
#define ETOOMANYREFS (RPC2_ERRBASE+59)
/* Too many references: can't splice */
166
#endif
167
#ifndef ETIMEDOUT
168
#define ETIMEDOUT (RPC2_ERRBASE+60)
/* Operation timed out */
169
#endif
170
#ifndef ELOOP
171
#define ELOOP (RPC2_ERRBASE+62)
/* Too many levels of symbolic links */
172
#endif
173
#ifndef ENAMETOOLONG
174
#define ENAMETOOLONG (RPC2_ERRBASE+63)
/* File name too long */
175
#endif
176
#ifndef ENOTEMPTY
177
#define ENOTEMPTY (RPC2_ERRBASE+66)
/* Directory not empty */
178
#endif
179
#ifndef EDQUOT
180
#define EDQUOT (RPC2_ERRBASE+69)
/* Disc quota exceeded */
181
#endif
182
183
/* Coda client <-> server specific errors */
184
#ifndef VSALVAGE
185
#define VSALVAGE (RPC2_ERRBASE+101)
/* Volume needs salvage */
186
#endif
187
#ifndef VNOVNODE
188
#define VNOVNODE (RPC2_ERRBASE+102)
/* Bad vnode number quoted */
189
#endif
190
#ifndef VNOVOL
191
#define VNOVOL (RPC2_ERRBASE+103)
/* Volume does not exist or not online */
192
#endif
193
#ifndef VVOLEXISTS
194
#define VVOLEXISTS (RPC2_ERRBASE+104)
/* Volume already exists */
195
#endif
196
#ifndef VNOSERVICE
197
#define VNOSERVICE (RPC2_ERRBASE+105)
/* Volume is not in service */
198
#endif
199
#ifndef VOFFLINE
200
#define VOFFLINE (RPC2_ERRBASE+106)
/* Volume is off line */
201
#endif
202
#ifndef VONLINE
203
#define VONLINE (RPC2_ERRBASE+107)
/* Volume is already on line */
204
#endif
205
#ifndef VBUSY
206
#define VBUSY (RPC2_ERRBASE+110)
/* Volume temporarily unavailable */
207
#endif
208
#ifndef VMOVED
209
#define VMOVED (RPC2_ERRBASE+111)
/* Volume has moved */
210
#endif
211
#ifndef VNOSERVER
212
#define VNOSERVER (RPC2_ERRBASE+112)
/* File server lwp is not running */
213
#endif
214
#ifndef VLOGSTALE
215
#define VLOGSTALE (RPC2_ERRBASE+113)
/* CML head previously reintegrated */
216
#endif
217
#ifndef EVOLUME
218
#define EVOLUME (RPC2_ERRBASE+158)
/* Volume error */
219
#endif
220
#ifndef EINCOMPATIBLE
221
#define EINCOMPATIBLE (RPC2_ERRBASE+198)
/* Version vectors are incompatible */
222
#endif
223
#ifndef EINCONS
224
#define EINCONS (RPC2_ERRBASE+199)
/* File is inconsistent */
225
#endif
226
#ifndef VFAIL
227
#define VFAIL (RPC2_ERRBASE+200)
/* Unknown Coda error */
228
#endif
229
230
/* Advice monitor related errors, we should really not use these anymore */
231
// #define CAEFAIL 300 /* Unknown error related to the Advice Monitor */
232
// #define CAEVERSIONSKEW 301 /* Version skew between Venus and the Advice Monitor */
233
#ifndef CAENOSUCHUSER
234
#define CAENOSUCHUSER (RPC2_ERRBASE+302)
/* Advice Monitor attempted to connect on behalf of an unknown user */
235
#endif
236
#ifndef CAENOTVALID
237
#define CAENOTVALID (RPC2_ERRBASE+303)
/* Advice Monitor attempted to test liveness of an invalid connection */
238
#endif
239
#ifndef CAENOASR
240
#define CAENOASR (RPC2_ERRBASE+304)
/* Advice Monitor returned the result of an ASR, but not ASR is pending */
241
#endif
242
#ifndef CAEUNEXPECTEDASR
243
#define CAEUNEXPECTEDASR (RPC2_ERRBASE+305)
/* Advice Monitor returned the result of the wrong ASR */
244
#endif
245
// #define CAEASRINPROGRESS 306 /* Venus requested an ASR while another one is in progress */
246
#ifndef CAEADVICEPENDING
247
#define CAEADVICEPENDING (RPC2_ERRBASE+307)
/* Advice Monitor requested a new connection while a request is pending */
248
#endif
249
#ifndef CAENOSERVERS
250
#define CAENOSERVERS (RPC2_ERRBASE+308)
/* No servers are known to Venus */
251
#endif
252
253
254
#endif
/* _ERRORS_H_ */
cerror
const char * cerror(int err)
Definition:
errors.c:56
Generated by
1.9.4