1 | /** @file
|
---|
2 | * innotek Portable Runtime - Status Codes.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2006-2007 innotek GmbH
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | * available from http://www.virtualbox.org. This file is free software;
|
---|
10 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | * General Public License as published by the Free Software Foundation,
|
---|
12 | * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
|
---|
13 | * distribution. VirtualBox OSE is distributed in the hope that it will
|
---|
14 | * be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | *
|
---|
16 | * If you received this file as part of a commercial VirtualBox
|
---|
17 | * distribution, then only the terms of your commercial VirtualBox
|
---|
18 | * license agreement apply instead of the previous paragraph.
|
---|
19 | */
|
---|
20 |
|
---|
21 |
|
---|
22 | #ifndef __iprt_err_h__
|
---|
23 | #define __iprt_err_h__
|
---|
24 |
|
---|
25 | #include <iprt/cdefs.h>
|
---|
26 | #include <iprt/types.h>
|
---|
27 |
|
---|
28 | __BEGIN_DECLS
|
---|
29 |
|
---|
30 | /** @defgroup grp_rt_err RTErr - Status Codes
|
---|
31 | * @ingroup grp_rt
|
---|
32 | * @{
|
---|
33 | */
|
---|
34 | /* SED-START */
|
---|
35 |
|
---|
36 | /** @name Misc. Status Codes
|
---|
37 | * @{
|
---|
38 | */
|
---|
39 | /** Success. */
|
---|
40 | #define VINF_SUCCESS 0
|
---|
41 |
|
---|
42 | /** General failure - DON'T USE THIS!!!
|
---|
43 | * (aka SUPDRV_ERR_GENERAL_FAILURE) */
|
---|
44 | #define VERR_GENERAL_FAILURE (-1)
|
---|
45 | /** Invalid parameter.
|
---|
46 | * (aka SUPDRV_ERR_INVALID_PARAM) */
|
---|
47 | #define VERR_INVALID_PARAMETER (-2)
|
---|
48 | /** Invalid magic or cookie.
|
---|
49 | * (aka SUPDRV_ERR_INVALID_MAGIC) */
|
---|
50 | #define VERR_INVALID_MAGIC (-3)
|
---|
51 | /** Invalid loader handle.
|
---|
52 | * (aka SUPDRV_ERR_INVALID_HANDLE) */
|
---|
53 | #define VERR_INVALID_HANDLE (-4)
|
---|
54 | /** Failed to lock the address range.
|
---|
55 | * (aka SUPDRV_ERR_INVALID_HANDLE) */
|
---|
56 | #define VERR_LOCK_FAILED (-5)
|
---|
57 | /** Invalid memory pointer.
|
---|
58 | * (aka SUPDRV_ERR_INVALID_POINTER) */
|
---|
59 | #define VERR_INVALID_POINTER (-6)
|
---|
60 | /** Failed to patch the IDT.
|
---|
61 | * (aka SUPDRV_ERR_IDT_FAILED) */
|
---|
62 | #define VERR_IDT_FAILED (-7)
|
---|
63 | /** Memory allocation failed.
|
---|
64 | * (aka SUPDRV_ERR_NO_MEMORY) */
|
---|
65 | #define VERR_NO_MEMORY (-8)
|
---|
66 | /** Already loaded.
|
---|
67 | * (aka SUPDRV_ERR_ALREADY_LOADED) */
|
---|
68 | #define VERR_ALREADY_LOADED (-9)
|
---|
69 | /** Permission denied.
|
---|
70 | * (aka SUPDRV_ERR_PERMISSION_DENIED) */
|
---|
71 | #define VERR_PERMISSION_DENIED (-10)
|
---|
72 | /** Version mismatch.
|
---|
73 | * (aka SUPDRV_ERR_VERSION_MISMATCH) */
|
---|
74 | #define VERR_VERSION_MISMATCH (-11)
|
---|
75 | /** The request function is not implemented. */
|
---|
76 | #define VERR_NOT_IMPLEMENTED (-12)
|
---|
77 |
|
---|
78 | /** Failed to allocate temporary memory. */
|
---|
79 | #define VERR_NO_TMP_MEMORY (-20)
|
---|
80 | /** Invalid file mode mask (RTFMODE). */
|
---|
81 | #define VERR_INVALID_FMODE (-21)
|
---|
82 | /** Incorrect call order. */
|
---|
83 | #define VERR_WRONG_ORDER (-22)
|
---|
84 | /** There is no TLS (thread local storage) available for storing the current thread. */
|
---|
85 | #define VERR_NO_TLS_FOR_SELF (-23)
|
---|
86 | /** Failed to set the TLS (thread local storage) entry which points to our thread structure. */
|
---|
87 | #define VERR_FAILED_TO_SET_SELF_TLS (-24)
|
---|
88 | /** Not able to allocate contiguous memory. */
|
---|
89 | #define VERR_NO_CONT_MEMORY (-26)
|
---|
90 | /** No memory available for page table or page directory. */
|
---|
91 | #define VERR_NO_PAGE_MEMORY (-27)
|
---|
92 | /** Already initialized. */
|
---|
93 | #define VINF_ALREADY_INITIALIZED 28
|
---|
94 | /** The specified thread is dead. */
|
---|
95 | #define VERR_THREAD_IS_DEAD (-29)
|
---|
96 | /** The specified thread is not waitable. */
|
---|
97 | #define VERR_THREAD_NOT_WAITABLE (-30)
|
---|
98 | /** Pagetable not present. */
|
---|
99 | #define VERR_PAGE_TABLE_NOT_PRESENT (-31)
|
---|
100 | /** Internal error - we're screwed if this happens. */
|
---|
101 | #define VERR_INTERNAL_ERROR (-32)
|
---|
102 | /** The per process timer is busy. */
|
---|
103 | #define VERR_TIMER_BUSY (-33)
|
---|
104 | /** Address conflict. */
|
---|
105 | #define VERR_ADDRESS_CONFLICT (-34)
|
---|
106 | /** Unresolved (unknown) host platform error. */
|
---|
107 | #define VERR_UNRESOLVED_ERROR (-35)
|
---|
108 | /** Invalid function. */
|
---|
109 | #define VERR_INVALID_FUNCTION (-36)
|
---|
110 | /** Not supported. */
|
---|
111 | #define VERR_NOT_SUPPORTED (-37)
|
---|
112 | /** Access denied. */
|
---|
113 | #define VERR_ACCESS_DENIED (-38)
|
---|
114 | /** Call interrupted. */
|
---|
115 | #define VERR_INTERRUPTED (-39)
|
---|
116 | /** Timeout. */
|
---|
117 | #define VERR_TIMEOUT (-40)
|
---|
118 | /** Buffer too small to save result. */
|
---|
119 | #define VERR_BUFFER_OVERFLOW (-41)
|
---|
120 | /** Buffer too small to save result. */
|
---|
121 | #define VINF_BUFFER_OVERFLOW 41
|
---|
122 | /** Data size overflow. */
|
---|
123 | #define VERR_TOO_MUCH_DATA (-42)
|
---|
124 | /** Max threads number reached. */
|
---|
125 | #define VERR_MAX_THRDS_REACHED (-43)
|
---|
126 | /** Max process number reached. */
|
---|
127 | #define VERR_MAX_PROCS_REACHED (-44)
|
---|
128 | /** The recipient process has refused the signal. */
|
---|
129 | #define VERR_SIGNAL_REFUSED (-45)
|
---|
130 | /** A signal is already pending. */
|
---|
131 | #define VERR_SIGNAL_PENDING (-46)
|
---|
132 | /** The signal being posted is not correct. */
|
---|
133 | #define VERR_SIGNAL_INVALID (-47)
|
---|
134 | /** The state changed.
|
---|
135 | * This is a generic error message and needs a context to make sense. */
|
---|
136 | #define VERR_STATE_CHANGED (-48)
|
---|
137 | /** Warning, the state changed.
|
---|
138 | * This is a generic error message and needs a context to make sense. */
|
---|
139 | #define VWRN_STATE_CHANGED 48
|
---|
140 | /** Error while parsing UUID string */
|
---|
141 | #define VERR_INVALID_UUID_FORMAT (-49)
|
---|
142 | /** The specified process was not found. */
|
---|
143 | #define VERR_PROCESS_NOT_FOUND (-50)
|
---|
144 | /** The process specified to a non-block wait had not exitted. */
|
---|
145 | #define VERR_PROCESS_RUNNING (-51)
|
---|
146 | /** Retry the operation. */
|
---|
147 | #define VERR_TRY_AGAIN (-52)
|
---|
148 | /** Generic parse error. */
|
---|
149 | #define VERR_PARSE_ERROR (-53)
|
---|
150 | /** Value out of range. */
|
---|
151 | #define VERR_OUT_OF_RANGE (-54)
|
---|
152 | /** A numeric convertion encountered a value which was too big for the target. */
|
---|
153 | #define VERR_NUMBER_TOO_BIG (-55)
|
---|
154 | /** A numeric convertion encountered a value which was too big for the target. */
|
---|
155 | #define VWRN_NUMBER_TOO_BIG 55
|
---|
156 | /** The number begin converted (string) contained no digits. */
|
---|
157 | #define VERR_NO_DIGITS (-56)
|
---|
158 | /** The number begin converted (string) contained no digits. */
|
---|
159 | #define VWRN_NO_DIGITS 56
|
---|
160 | /** Encountered a '-' during convertion to an unsigned value. */
|
---|
161 | #define VERR_NEGATIVE_UNSIGNED (-57)
|
---|
162 | /** Encountered a '-' during convertion to an unsigned value. */
|
---|
163 | #define VWRN_NEGATIVE_UNSIGNED 57
|
---|
164 | /** Error while characters translation (unicode and so). */
|
---|
165 | #define VERR_NO_TRANSLATION (-58)
|
---|
166 | /** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */
|
---|
167 | #define VERR_CODE_POINT_ENDIAN_INDICATOR (-59)
|
---|
168 | /** Encountered unicode code point in the surrogate range (0xd800 to 0xdfff). */
|
---|
169 | #define VERR_CODE_POINT_SURROGATE (-60)
|
---|
170 | /** A string claiming to be UTF-8 is incorrectly encoded. */
|
---|
171 | #define VERR_INVALID_UTF8_ENCODING (-61)
|
---|
172 | /** Ad string claiming to be in UTF-16 is incorrectly encoded. */
|
---|
173 | #define VERR_INVALID_UTF16_ENCODING (-62)
|
---|
174 | /** Encountered a unicode code point which cannot be represented as UTF-16. */
|
---|
175 | #define VERR_CANT_RECODE_AS_UTF16 (-63)
|
---|
176 | /** Got an out of memory condition trying to allocate a string. */
|
---|
177 | #define VERR_NO_STR_MEMORY (-64)
|
---|
178 | /** Got an out of memory condition trying to allocate a UTF-16 (/UCS-2) string. */
|
---|
179 | #define VERR_NO_UTF16_MEMORY (-65)
|
---|
180 | /** Get an out of memory condition trying to allocate a code point array. */
|
---|
181 | #define VERR_NO_CODE_POINT_MEMORY (-66)
|
---|
182 | /** Can't free the memory because it's used in mapping. */
|
---|
183 | #define VERR_MEMORY_BUSY (-67)
|
---|
184 | /** The timer can't be started because it's already active. */
|
---|
185 | #define VERR_TIMER_ACTIVE (-68)
|
---|
186 | /** The timer can't be stopped because i's already suspended. */
|
---|
187 | #define VERR_TIMER_SUSPENDED (-69)
|
---|
188 | /** The operation was cancelled by the user. */
|
---|
189 | #define VERR_CANCELLED (-70)
|
---|
190 | /** Failed to initialize a memory object.
|
---|
191 | * Exactly what this means is OS specific. */
|
---|
192 | #define VERR_MEMOBJ_INIT_FAILED (-71)
|
---|
193 | /** Out of memory condition when allocating memory with low physical backing. */
|
---|
194 | #define VERR_NO_LOW_MEMORY (-72)
|
---|
195 | /** Out of memory condition when allocating physical memory (without mapping). */
|
---|
196 | #define VERR_NO_PHYS_MEMORY (-73)
|
---|
197 | /** The address (virtual or physical) is too big. */
|
---|
198 | #define VERR_ADDRESS_TOO_BIG (-74)
|
---|
199 | /** Failed to map a memory object. */
|
---|
200 | #define VERR_MAP_FAILED (-75)
|
---|
201 | /** @} */
|
---|
202 |
|
---|
203 |
|
---|
204 | /** @name Common File/Disk/Pipe/etc Status Codes
|
---|
205 | * @{
|
---|
206 | */
|
---|
207 | /** Unresolved (unknown) file i/o error. */
|
---|
208 | #define VERR_FILE_IO_ERROR (-100)
|
---|
209 | /** File/Device open failed. */
|
---|
210 | #define VERR_OPEN_FAILED (-101)
|
---|
211 | /** File not found. */
|
---|
212 | #define VERR_FILE_NOT_FOUND (-102)
|
---|
213 | /** Path not found. */
|
---|
214 | #define VERR_PATH_NOT_FOUND (-103)
|
---|
215 | /** Invalid (malformed) file/path name. */
|
---|
216 | #define VERR_INVALID_NAME (-104)
|
---|
217 | /** File/Device already exists. */
|
---|
218 | #define VERR_ALREADY_EXISTS (-105)
|
---|
219 | /** Too many open files. */
|
---|
220 | #define VERR_TOO_MANY_OPEN_FILES (-106)
|
---|
221 | /** Seek error. */
|
---|
222 | #define VERR_SEEK (-107)
|
---|
223 | /** Seek below file start. */
|
---|
224 | #define VERR_NEGATIVE_SEEK (-108)
|
---|
225 | /** Trying to seek on device. */
|
---|
226 | #define VERR_SEEK_ON_DEVICE (-109)
|
---|
227 | /** Reached the end of the file. */
|
---|
228 | #define VERR_EOF (-110)
|
---|
229 | /** Reached the end of the file. */
|
---|
230 | #define VINF_EOF 110
|
---|
231 | /** Generic file read error. */
|
---|
232 | #define VERR_READ_ERROR (-111)
|
---|
233 | /** Generic file write error. */
|
---|
234 | #define VERR_WRITE_ERROR (-112)
|
---|
235 | /** Write protect error. */
|
---|
236 | #define VERR_WRITE_PROTECT (-113)
|
---|
237 | /** Sharing violetion, file is being used by another process. */
|
---|
238 | #define VERR_SHARING_VIOLATION (-114)
|
---|
239 | /** Unable to lock a region of a file. */
|
---|
240 | #define VERR_FILE_LOCK_FAILED (-115)
|
---|
241 | /** File access error, another process has locked a portion of the file. */
|
---|
242 | #define VERR_FILE_LOCK_VIOLATION (-116)
|
---|
243 | /** File or directory can't be created. */
|
---|
244 | #define VERR_CANT_CREATE (-117)
|
---|
245 | /** Directory can't be deleted. */
|
---|
246 | #define VERR_CANT_DELETE_DIRECTORY (-118)
|
---|
247 | /** Can't move file to another disk. */
|
---|
248 | #define VERR_NOT_SAME_DEVICE (-119)
|
---|
249 | /** The filename or extension is too long. */
|
---|
250 | #define VERR_FILENAME_TOO_LONG (-120)
|
---|
251 | /** Media not present in drive. */
|
---|
252 | #define VERR_MEDIA_NOT_PRESENT (-121)
|
---|
253 | /** The type of media was not recognized. Not formatted? */
|
---|
254 | #define VERR_MEDIA_NOT_RECOGNIZED (-122)
|
---|
255 | /** Can't unlock - region was not locked. */
|
---|
256 | #define VERR_FILE_NOT_LOCKED (-123)
|
---|
257 | /** Unrecoverable error: lock was lost. */
|
---|
258 | #define VERR_FILE_LOCK_LOST (-124)
|
---|
259 | /** Can't delete directory with files. */
|
---|
260 | #define VERR_DIR_NOT_EMPTY (-125)
|
---|
261 | /** A directory operation was attempted on a non-directory object. */
|
---|
262 | #define VERR_NOT_A_DIRECTORY (-126)
|
---|
263 | /** A non-directory operation was attempted on a directory object. */
|
---|
264 | #define VERR_IS_A_DIRECTORY (-127)
|
---|
265 | /** Tried to grow a file beyond the limit imposed by the process or the filesystem. */
|
---|
266 | #define VERR_FILE_TOO_BIG (-128)
|
---|
267 | /** @} */
|
---|
268 |
|
---|
269 |
|
---|
270 | /** @name Generic Filesystem I/O Status Codes
|
---|
271 | * @{
|
---|
272 | */
|
---|
273 | /** Unresolved (unknown) disk i/o error. */
|
---|
274 | #define VERR_DISK_IO_ERROR (-150)
|
---|
275 | /** Invalid drive number. */
|
---|
276 | #define VERR_INVALID_DRIVE (-151)
|
---|
277 | /** Disk is full. */
|
---|
278 | #define VERR_DISK_FULL (-152)
|
---|
279 | /** Disk was changed. */
|
---|
280 | #define VERR_DISK_CHANGE (-153)
|
---|
281 | /** Drive is locked. */
|
---|
282 | #define VERR_DRIVE_LOCKED (-154)
|
---|
283 | /** The specified disk or diskette cannot be accessed. */
|
---|
284 | #define VERR_DISK_INVALID_FORMAT (-155)
|
---|
285 | /** Too many symbolic links. */
|
---|
286 | #define VERR_TOO_MANY_SYMLINKS (-156)
|
---|
287 | /** @} */
|
---|
288 |
|
---|
289 |
|
---|
290 | /** @name Generic Directory Enumeration Status Codes
|
---|
291 | * @{
|
---|
292 | */
|
---|
293 | /** Unresolved (unknown) search error. */
|
---|
294 | #define VERR_SEARCH_ERROR (-200)
|
---|
295 | /** No more files found. */
|
---|
296 | #define VERR_NO_MORE_FILES (-201)
|
---|
297 | /** No more search handles available. */
|
---|
298 | #define VERR_NO_MORE_SEARCH_HANDLES (-202)
|
---|
299 | /** RTDirReadEx() failed to retrieve the extra data which was requested. */
|
---|
300 | #define VWRN_NO_DIRENT_INFO 203
|
---|
301 | /** @} */
|
---|
302 |
|
---|
303 |
|
---|
304 | /** @name Generic Device I/O Status Codes
|
---|
305 | * @{
|
---|
306 | */
|
---|
307 | /** Unresolved (unknown) device i/o error. */
|
---|
308 | #define VERR_DEV_IO_ERROR (-250)
|
---|
309 | /** Device i/o: Bad unit. */
|
---|
310 | #define VERR_IO_BAD_UNIT (-251)
|
---|
311 | /** Device i/o: Not ready. */
|
---|
312 | #define VERR_IO_NOT_READY (-252)
|
---|
313 | /** Device i/o: Bad command. */
|
---|
314 | #define VERR_IO_BAD_COMMAND (-253)
|
---|
315 | /** Device i/o: CRC error. */
|
---|
316 | #define VERR_IO_CRC (-254)
|
---|
317 | /** Device i/o: Bad length. */
|
---|
318 | #define VERR_IO_BAD_LENGTH (-255)
|
---|
319 | /** Device i/o: Sector not found. */
|
---|
320 | #define VERR_IO_SECTOR_NOT_FOUND (-256)
|
---|
321 | /** Device i/o: General failure. */
|
---|
322 | #define VERR_IO_GEN_FAILURE (-257)
|
---|
323 | /** @} */
|
---|
324 |
|
---|
325 |
|
---|
326 | /** @name Generic Pipe I/O Status Codes
|
---|
327 | * @{
|
---|
328 | */
|
---|
329 | /** Unresolved (unknown) pipe i/o error. */
|
---|
330 | #define VERR_PIPE_IO_ERROR (-300)
|
---|
331 | /** Broken pipe. */
|
---|
332 | #define VERR_BROKEN_PIPE (-301)
|
---|
333 | /** Bad pipe. */
|
---|
334 | #define VERR_BAD_PIPE (-302)
|
---|
335 | /** Pipe is busy. */
|
---|
336 | #define VERR_PIPE_BUSY (-303)
|
---|
337 | /** No data in pipe. */
|
---|
338 | #define VERR_NO_DATA (-304)
|
---|
339 | /** Pipe is not connected. */
|
---|
340 | #define VERR_PIPE_NOT_CONNECTED (-305)
|
---|
341 | /** More data available in pipe. */
|
---|
342 | #define VERR_MORE_DATA (-306)
|
---|
343 | /** @} */
|
---|
344 |
|
---|
345 |
|
---|
346 | /** @name Generic Semaphores Status Codes
|
---|
347 | * @{
|
---|
348 | */
|
---|
349 | /** Unresolved (unknown) semaphore error. */
|
---|
350 | #define VERR_SEM_ERROR (-350)
|
---|
351 | /** Too many semaphores. */
|
---|
352 | #define VERR_TOO_MANY_SEMAPHORES (-351)
|
---|
353 | /** Exclusive semaphore is owned by another process. */
|
---|
354 | #define VERR_EXCL_SEM_ALREADY_OWNED (-352)
|
---|
355 | /** The semaphore is set and cannot be closed. */
|
---|
356 | #define VERR_SEM_IS_SET (-353)
|
---|
357 | /** The semaphore cannot be set again. */
|
---|
358 | #define VERR_TOO_MANY_SEM_REQUESTS (-354)
|
---|
359 | /** Attempt to release mutex not owned by caller. */
|
---|
360 | #define VERR_NOT_OWNER (-355)
|
---|
361 | /** The semaphore has been opened too many times. */
|
---|
362 | #define VERR_TOO_MANY_OPENS (-356)
|
---|
363 | /** The maximum posts for the event semaphore has been reached. */
|
---|
364 | #define VERR_TOO_MANY_POSTS (-357)
|
---|
365 | /** The event semaphore has already been posted. */
|
---|
366 | #define VERR_ALREADY_POSTED (-358)
|
---|
367 | /** The event semaphore has already been reset. */
|
---|
368 | #define VERR_ALREADY_RESET (-359)
|
---|
369 | /** The semaphore is in use. */
|
---|
370 | #define VERR_SEM_BUSY (-360)
|
---|
371 | /** The previous ownership of this semaphore has ended. */
|
---|
372 | #define VERR_SEM_OWNER_DIED (-361)
|
---|
373 | /** Failed to open semaphore by name - not found. */
|
---|
374 | #define VERR_SEM_NOT_FOUND (-362)
|
---|
375 | /** Semaphore destroyed while waiting. */
|
---|
376 | #define VERR_SEM_DESTROYED (-363)
|
---|
377 | /** Nested ownership requests are not permitted for this semaphore type. */
|
---|
378 | #define VERR_SEM_NESTED (-364)
|
---|
379 | /** Deadlock detected. */
|
---|
380 | #define VERR_DEADLOCK (-365)
|
---|
381 | /** Ping-Pong listen or speak out of turn error. */
|
---|
382 | #define VERR_SEM_OUT_OF_TURN (-366)
|
---|
383 | /** @} */
|
---|
384 |
|
---|
385 |
|
---|
386 | /** @name Generic Network I/O Status Codes
|
---|
387 | * @{
|
---|
388 | */
|
---|
389 | /** Unresolved (unknown) network error. */
|
---|
390 | #define VERR_NET_IO_ERROR (-400)
|
---|
391 | /** The network is busy or is out of resources. */
|
---|
392 | #define VERR_NET_OUT_OF_RESOURCES (-401)
|
---|
393 | /** Net host name not found. */
|
---|
394 | #define VERR_NET_HOST_NOT_FOUND (-402)
|
---|
395 | /** Network path not found. */
|
---|
396 | #define VERR_NET_PATH_NOT_FOUND (-403)
|
---|
397 | /** General network printing error. */
|
---|
398 | #define VERR_NET_PRINT_ERROR (-404)
|
---|
399 | /** The machine is not on the network. */
|
---|
400 | #define VERR_NET_NO_NETWORK (-405)
|
---|
401 | /** Name is not unique on the network. */
|
---|
402 | #define VERR_NET_NOT_UNIQUE_NAME (-406)
|
---|
403 |
|
---|
404 | /* These are BSD networking error codes - numbers correspond, don't mess! */
|
---|
405 | /** Operation in progress. */
|
---|
406 | #define VERR_NET_IN_PROGRESS (-436)
|
---|
407 | /** Operation already in progress. */
|
---|
408 | #define VERR_NET_ALREADY_IN_PROGRESS (-437)
|
---|
409 | /** Attempted socket operation with a non-socket handle.
|
---|
410 | * (This includes closed handles.) */
|
---|
411 | #define VERR_NET_NOT_SOCKET (-438)
|
---|
412 | /** Destination address required. */
|
---|
413 | #define VERR_NET_DEST_ADDRESS_REQUIRED (-439)
|
---|
414 | /** Message too long. */
|
---|
415 | #define VERR_NET_MSG_SIZE (-440)
|
---|
416 | /** Protocol wrong type for socket. */
|
---|
417 | #define VERR_NET_PROTOCOL_TYPE (-441)
|
---|
418 | /** Protocol not available. */
|
---|
419 | #define VERR_NET_PROTOCOL_NOT_AVAILABLE (-442)
|
---|
420 | /** Protocol not supported. */
|
---|
421 | #define VERR_NET_PROTOCOL_NOT_SUPPORTED (-443)
|
---|
422 | /** Socket type not supported. */
|
---|
423 | #define VERR_NET_SOCKET_TYPE_NOT_SUPPORTED (-444)
|
---|
424 | /** Operation not supported. */
|
---|
425 | #define VERR_NET_OPERATION_NOT_SUPPORTED (-445)
|
---|
426 | /** Protocol family not supported. */
|
---|
427 | #define VERR_NET_PROTOCOL_FAMILY_NOT_SUPPORTED (-446)
|
---|
428 | /** Address family not supported by protocol family. */
|
---|
429 | #define VERR_NET_ADDRESS_FAMILY_NOT_SUPPORTED (-447)
|
---|
430 | /** Address already in use. */
|
---|
431 | #define VERR_NET_ADDRESS_IN_USE (-448)
|
---|
432 | /** Can't assign requested address. */
|
---|
433 | #define VERR_NET_ADDRESS_NOT_AVAILABLE (-449)
|
---|
434 | /** Network is down. */
|
---|
435 | #define VERR_NET_DOWN (-450)
|
---|
436 | /** Network is unreachable. */
|
---|
437 | #define VERR_NET_UNREACHABLE (-451)
|
---|
438 | /** Network dropped connection on reset. */
|
---|
439 | #define VERR_NET_CONNECTION_RESET (-452)
|
---|
440 | /** Software caused connection abort. */
|
---|
441 | #define VERR_NET_CONNECTION_ABORTED (-453)
|
---|
442 | /** Connection reset by peer. */
|
---|
443 | #define VERR_NET_CONNECTION_RESET_BY_PEER (-454)
|
---|
444 | /** No buffer space available. */
|
---|
445 | #define VERR_NET_NO_BUFFER_SPACE (-455)
|
---|
446 | /** Socket is already connected. */
|
---|
447 | #define VERR_NET_ALREADY_CONNECTED (-456)
|
---|
448 | /** Socket is not connected. */
|
---|
449 | #define VERR_NET_NOT_CONNECTED (-457)
|
---|
450 | /** Can't send after socket shutdown. */
|
---|
451 | #define VERR_NET_SHUTDOWN (-458)
|
---|
452 | /** Too many references: can't splice. */
|
---|
453 | #define VERR_NET_TOO_MANY_REFERENCES (-459)
|
---|
454 | /** Too many references: can't splice. */
|
---|
455 | #define VERR_NET_CONNECTION_TIMED_OUT (-460)
|
---|
456 | /** Connection refused. */
|
---|
457 | #define VERR_NET_CONNECTION_REFUSED (-461)
|
---|
458 | /* ELOOP is not net. */
|
---|
459 | /* ENAMETOOLONG is not net. */
|
---|
460 | /** Host is down. */
|
---|
461 | #define VERR_NET_HOST_DOWN (-464)
|
---|
462 | /** No route to host. */
|
---|
463 | #define VERR_NET_HOST_UNREACHABLE (-465)
|
---|
464 | /** @} */
|
---|
465 |
|
---|
466 |
|
---|
467 | /** @name TCP Status Codes
|
---|
468 | * @{
|
---|
469 | */
|
---|
470 | /** Stop the TCP server. */
|
---|
471 | #define VERR_TCP_SERVER_STOP (-500)
|
---|
472 | /** The server was stopped. */
|
---|
473 | #define VINF_TCP_SERVER_STOP 500
|
---|
474 | /** @} */
|
---|
475 |
|
---|
476 |
|
---|
477 | /** @name L4 Specific Status Codes
|
---|
478 | * @{
|
---|
479 | */
|
---|
480 | /** Invalid offset in an L4 dataspace */
|
---|
481 | #define VERR_L4_INVALID_DS_OFFSET (-550)
|
---|
482 | /** IPC error */
|
---|
483 | #define VERR_IPC (-551)
|
---|
484 | /** Item already used */
|
---|
485 | #define VERR_RESOURCE_IN_USE (-552)
|
---|
486 | /** Source/destination not found */
|
---|
487 | #define VERR_IPC_PROCESS_NOT_FOUND (-553)
|
---|
488 | /** Receive timeout */
|
---|
489 | #define VERR_IPC_RECEIVE_TIMEOUT (-554)
|
---|
490 | /** Send timeout */
|
---|
491 | #define VERR_IPC_SEND_TIMEOUT (-555)
|
---|
492 | /** Receive cancelled */
|
---|
493 | #define VERR_IPC_RECEIVE_CANCELLED (-556)
|
---|
494 | /** Send cancelled */
|
---|
495 | #define VERR_IPC_SEND_CANCELLED (-557)
|
---|
496 | /** Receive aborted */
|
---|
497 | #define VERR_IPC_RECEIVE_ABORTED (-558)
|
---|
498 | /** Send aborted */
|
---|
499 | #define VERR_IPC_SEND_ABORTED (-559)
|
---|
500 | /** Couldn't map pages during receive */
|
---|
501 | #define VERR_IPC_RECEIVE_MAP_FAILED (-560)
|
---|
502 | /** Couldn't map pages during send */
|
---|
503 | #define VERR_IPC_SEND_MAP_FAILED (-561)
|
---|
504 | /** Send pagefault timeout in receive */
|
---|
505 | #define VERR_IPC_RECEIVE_SEND_PF_TIMEOUT (-562)
|
---|
506 | /** Send pagefault timeout in send */
|
---|
507 | #define VERR_IPC_SEND_SEND_PF_TIMEOUT (-563)
|
---|
508 | /** (One) receive buffer was too small, or too few buffers */
|
---|
509 | #define VINF_IPC_RECEIVE_MSG_CUT 564
|
---|
510 | /** (One) send buffer was too small, or too few buffers */
|
---|
511 | #define VINF_IPC_SEND_MSG_CUT 565
|
---|
512 | /** Dataspace manager server not found */
|
---|
513 | #define VERR_L4_DS_MANAGER_NOT_FOUND (-566)
|
---|
514 | /** @} */
|
---|
515 |
|
---|
516 |
|
---|
517 | /** @name Loader Status Codes.
|
---|
518 | * @{
|
---|
519 | */
|
---|
520 | /** Invalid executable signature. */
|
---|
521 | #define VERR_INVALID_EXE_SIGNATURE (-600)
|
---|
522 | /** The iprt loader recognized a ELF image, but doesn't support loading it. */
|
---|
523 | #define VERR_ELF_EXE_NOT_SUPPORTED (-601)
|
---|
524 | /** The iprt loader recognized a PE image, but doesn't support loading it. */
|
---|
525 | #define VERR_PE_EXE_NOT_SUPPORTED (-602)
|
---|
526 | /** The iprt loader recognized a LX image, but doesn't support loading it. */
|
---|
527 | #define VERR_LX_EXE_NOT_SUPPORTED (-603)
|
---|
528 | /** The iprt loader recognized a LE image, but doesn't support loading it. */
|
---|
529 | #define VERR_LE_EXE_NOT_SUPPORTED (-604)
|
---|
530 | /** The iprt loader recognized a NE image, but doesn't support loading it. */
|
---|
531 | #define VERR_NE_EXE_NOT_SUPPORTED (-605)
|
---|
532 | /** The iprt loader recognized a MZ image, but doesn't support loading it. */
|
---|
533 | #define VERR_MZ_EXE_NOT_SUPPORTED (-606)
|
---|
534 | /** The iprt loader recognized an a.out image, but doesn't support loading it. */
|
---|
535 | #define VERR_AOUT_EXE_NOT_SUPPORTED (-607)
|
---|
536 | /** Bad executable. */
|
---|
537 | #define VERR_BAD_EXE_FORMAT (-608)
|
---|
538 | /** Symbol (export) not found. */
|
---|
539 | #define VERR_SYMBOL_NOT_FOUND (-609)
|
---|
540 | /** Module not found. */
|
---|
541 | #define VERR_MODULE_NOT_FOUND (-610)
|
---|
542 | /** The loader resolved an external symbol to an address to big for the image format. */
|
---|
543 | #define VERR_SYMBOL_VALUE_TOO_BIG (-611)
|
---|
544 | /** The image is too big. */
|
---|
545 | #define VERR_IMAGE_TOO_BIG (-612)
|
---|
546 | /** The image base address is to high for this image type. */
|
---|
547 | #define VERR_IMAGE_BASE_TOO_HIGH (-614)
|
---|
548 | /** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
|
---|
549 | #define VERR_LDRPE_DELAY_IMPORT (-620)
|
---|
550 | /** The PE loader doesn't have a clue what the security data directory entry is all about. */
|
---|
551 | #define VERR_LDRPE_SECURITY (-621)
|
---|
552 | /** The PE loader doesn't know how to deal with the global pointer data directory entry yet. */
|
---|
553 | #define VERR_LDRPE_GLOBALPTR (-622)
|
---|
554 | /** The PE loader doesn't support the TLS data directory yet. */
|
---|
555 | #define VERR_LDRPE_TLS (-623)
|
---|
556 | /** The PE loader doesn't grok the COM descriptor data directory entry. */
|
---|
557 | #define VERR_LDRPE_COM_DESCRIPTOR (-624)
|
---|
558 | /** The PE loader encountered an unknown load config directory/header size. */
|
---|
559 | #define VERR_LDRPE_LOAD_CONFIG_SIZE (-625)
|
---|
560 | /** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
|
---|
561 | #define VERR_LDRPE_LOCK_PREFIX_TABLE (-626)
|
---|
562 | /** The ELF loader doesn't handle foreign endianness. */
|
---|
563 | #define VERR_LDRELF_ODD_ENDIAN (-630)
|
---|
564 | /** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
|
---|
565 | #define VERR_LDRELF_DYN (-631)
|
---|
566 | /** The ELF image is 'executable', the ELF loader can only deal with 'relocatable' images at present. */
|
---|
567 | #define VERR_LDRELF_EXEC (-632)
|
---|
568 | /** The ELF image was created for an unsupported target machine type. */
|
---|
569 | #define VERR_LDRELF_MACHINE (-633)
|
---|
570 | /** The ELF version is not supported. */
|
---|
571 | #define VERR_LDRELF_VERSION (-634)
|
---|
572 | /** The ELF loader cannot handle multiple SYMTAB sections. */
|
---|
573 | #define VERR_LDRELF_MULTIPLE_SYMTABS (-635)
|
---|
574 | /** The ELF loader encountered a relocation type which is not implemented. */
|
---|
575 | #define VERR_LDRELF_RELOCATION_NOT_SUPPORTED (-636)
|
---|
576 | /** The ELF loader encountered a bad symbol index. */
|
---|
577 | #define VERR_LDRELF_INVALID_SYMBOL_INDEX (-637)
|
---|
578 | /** The ELF loader encountered an invalid symbol name offset. */
|
---|
579 | #define VERR_LDRELF_INVALID_SYMBOL_NAME_OFFSET (-638)
|
---|
580 | /** The ELF loader encountered an invalid relocation offset. */
|
---|
581 | #define VERR_ELFLDR_INVALID_RELOCATION_OFFSET (-639)
|
---|
582 | /** @}*/
|
---|
583 |
|
---|
584 | /** @name Debug Info Reader Status Codes.
|
---|
585 | * @{
|
---|
586 | */
|
---|
587 | /** The specified segment:offset address was invalid. Typically an attempt at
|
---|
588 | * addressing outside the segment boundrary. */
|
---|
589 | #define VERR_DBGMOD_INVALID_ADDRESS (-650)
|
---|
590 | /** @} */
|
---|
591 |
|
---|
592 | /** @name Request Packet Status Codes.
|
---|
593 | * @{
|
---|
594 | */
|
---|
595 | /** Invalid RT request type.
|
---|
596 | * For the RTReqAlloc() case, the caller just specified an illegal enmType. For
|
---|
597 | * all the other occurences it means indicates corruption, broken logic, or stupid
|
---|
598 | * interface user. */
|
---|
599 | #define VERR_RT_REQUEST_INVALID_TYPE (-700)
|
---|
600 | /** Invalid RT request state.
|
---|
601 | * The state of the request packet was not the expected and accepted one(s). Either
|
---|
602 | * the interface user screwed up, or we've got corruption/broken logic. */
|
---|
603 | #define VERR_RT_REQUEST_STATE (-701)
|
---|
604 | /** Invalid RT request packet.
|
---|
605 | * One or more of the RT controlled packet members didn't contain the correct
|
---|
606 | * values. Some thing's broken. */
|
---|
607 | #define VERR_RT_REQUEST_INVALID_PACKAGE (-702)
|
---|
608 | /** The status field has not been updated yet as the request is still
|
---|
609 | * pending completion. Someone queried the iStatus field before the request
|
---|
610 | * has been fully processed. */
|
---|
611 | #define VERR_RT_REQUEST_STATUS_STILL_PENDING (-703)
|
---|
612 | /** The request has been freed, don't read the status now.
|
---|
613 | * Someone is reading the iStatus field of a freed request packet. */
|
---|
614 | #define VERR_RT_REQUEST_STATUS_FREED (-704)
|
---|
615 | /** @} */
|
---|
616 |
|
---|
617 | /* SED-END */
|
---|
618 |
|
---|
619 |
|
---|
620 | /** @defgroup grp_rt_err_hlp Status Code Helpers
|
---|
621 | * @ingroup grp_rt_err
|
---|
622 | * @{
|
---|
623 | */
|
---|
624 |
|
---|
625 | /** @def RT_SUCCESS
|
---|
626 | * Check for success. We expect success in normal cases, that is the code path depending on
|
---|
627 | * this check is normally taken. To prevent any prediction use RT_SUCCESS_NP instead.
|
---|
628 | *
|
---|
629 | * @returns true if rc indicates success.
|
---|
630 | * @returns false if rc indicates failure.
|
---|
631 | *
|
---|
632 | * @param rc The iprt status code to test.
|
---|
633 | */
|
---|
634 | #define RT_SUCCESS(rc) ( RT_LIKELY((int)(rc) >= VINF_SUCCESS) )
|
---|
635 |
|
---|
636 | /** @def RT_SUCCESS_NP
|
---|
637 | * Check for success. Don't predict the result.
|
---|
638 | *
|
---|
639 | * @returns true if rc indicates success.
|
---|
640 | * @returns false if rc indicates failure.
|
---|
641 | *
|
---|
642 | * @param rc The iprt status code to test.
|
---|
643 | */
|
---|
644 | #define RT_SUCCESS_NP(rc) ( (int)(rc) >= VINF_SUCCESS )
|
---|
645 |
|
---|
646 | /** @def RT_FAILURE
|
---|
647 | * Check for failure. We don't expect in normal cases, that is the code path depending on
|
---|
648 | * this check is normally NOT taken. To prevent any prediction use RT_FAILURE_NP instead.
|
---|
649 | *
|
---|
650 | * @returns true if rc indicates failure.
|
---|
651 | * @returns false if rc indicates success.
|
---|
652 | *
|
---|
653 | * @param rc The iprt status code to test.
|
---|
654 | */
|
---|
655 | #define RT_FAILURE(rc) ( RT_UNLIKELY(!RT_SUCCESS_NP(rc)) )
|
---|
656 |
|
---|
657 | /** @def RT_FAILURE_NP
|
---|
658 | * Check for failure. Don't predict the result.
|
---|
659 | *
|
---|
660 | * @returns true if rc indicates failure.
|
---|
661 | * @returns false if rc indicates success.
|
---|
662 | *
|
---|
663 | * @param rc The iprt status code to test.
|
---|
664 | */
|
---|
665 | #define RT_FAILURE_NP(rc) ( !RT_SUCCESS_NP(rc) )
|
---|
666 |
|
---|
667 | /**
|
---|
668 | * Converts a Darwin HRESULT error to an iprt status code.
|
---|
669 | *
|
---|
670 | * @returns iprt status code.
|
---|
671 | * @param iNativeCode errno code.
|
---|
672 | * @remark Darwin only.
|
---|
673 | */
|
---|
674 | RTDECL(int) RTErrConvertFromDarwinCOM(int32_t iNativeCode);
|
---|
675 |
|
---|
676 | /**
|
---|
677 | * Converts a Darwin IOReturn error to an iprt status code.
|
---|
678 | *
|
---|
679 | * @returns iprt status code.
|
---|
680 | * @param iNativeCode errno code.
|
---|
681 | * @remark Darwin only.
|
---|
682 | */
|
---|
683 | RTDECL(int) RTErrConvertFromDarwinIO(int iNativeCode);
|
---|
684 |
|
---|
685 | /**
|
---|
686 | * Converts a Darwin kern_return_t error to an iprt status code.
|
---|
687 | *
|
---|
688 | * @returns iprt status code.
|
---|
689 | * @param iNativeCode errno code.
|
---|
690 | * @remark Darwin only.
|
---|
691 | */
|
---|
692 | RTDECL(int) RTErrConvertFromDarwinKern(int iNativeCode);
|
---|
693 |
|
---|
694 | /**
|
---|
695 | * Converts errno to iprt status code.
|
---|
696 | *
|
---|
697 | * @returns iprt status code.
|
---|
698 | * @param uNativeCode errno code.
|
---|
699 | */
|
---|
700 | RTDECL(int) RTErrConvertFromErrno(unsigned uNativeCode);
|
---|
701 |
|
---|
702 | /**
|
---|
703 | * Converts a L4 errno to a iprt status code.
|
---|
704 | *
|
---|
705 | * @returns iprt status code.
|
---|
706 | * @param uNativeCode l4 errno.
|
---|
707 | * @remark L4 only.
|
---|
708 | */
|
---|
709 | RTDECL(int) RTErrConvertFromL4Errno(unsigned uNativeCode);
|
---|
710 |
|
---|
711 | /**
|
---|
712 | * Converts NT status code to iprt status code.
|
---|
713 | *
|
---|
714 | * Needless to say, this is only available on NT and winXX targets.
|
---|
715 | *
|
---|
716 | * @returns iprt status code.
|
---|
717 | * @param lNativeCode NT status code.
|
---|
718 | * @remark Windows only.
|
---|
719 | */
|
---|
720 | RTDECL(int) RTErrConvertFromNtStatus(long lNativeCode);
|
---|
721 |
|
---|
722 | /**
|
---|
723 | * Converts OS/2 error code to iprt status code.
|
---|
724 | *
|
---|
725 | * @returns iprt status code.
|
---|
726 | * @param uNativeCode OS/2 error code.
|
---|
727 | * @remark OS/2 only.
|
---|
728 | */
|
---|
729 | RTDECL(int) RTErrConvertFromOS2(unsigned uNativeCode);
|
---|
730 |
|
---|
731 | /**
|
---|
732 | * Converts Win32 error code to iprt status code.
|
---|
733 | *
|
---|
734 | * @returns iprt status code.
|
---|
735 | * @param uNativeCode Win32 error code.
|
---|
736 | * @remark Windows only.
|
---|
737 | */
|
---|
738 | RTDECL(int) RTErrConvertFromWin32(unsigned uNativeCode);
|
---|
739 |
|
---|
740 |
|
---|
741 | #ifdef IN_RING3
|
---|
742 |
|
---|
743 | /**
|
---|
744 | * iprt status code message.
|
---|
745 | */
|
---|
746 | typedef struct RTSTATUSMSG
|
---|
747 | {
|
---|
748 | /** Pointer to the short message string. */
|
---|
749 | const char *pszMsgShort;
|
---|
750 | /** Pointer to the full message string. */
|
---|
751 | const char *pszMsgFull;
|
---|
752 | /** Pointer to the define string. */
|
---|
753 | const char *pszDefine;
|
---|
754 | /** Status code number. */
|
---|
755 | int iCode;
|
---|
756 | } RTSTATUSMSG;
|
---|
757 | /** Pointer to iprt status code message. */
|
---|
758 | typedef RTSTATUSMSG *PRTSTATUSMSG;
|
---|
759 | /** Pointer to const iprt status code message. */
|
---|
760 | typedef const RTSTATUSMSG *PCRTSTATUSMSG;
|
---|
761 |
|
---|
762 | /**
|
---|
763 | * Get the message structure corresponding to a given iprt status code.
|
---|
764 | *
|
---|
765 | * @returns Pointer to read-only message description.
|
---|
766 | * @param rc The status code.
|
---|
767 | */
|
---|
768 | RTDECL(PCRTSTATUSMSG) RTErrGet(int rc);
|
---|
769 |
|
---|
770 | /**
|
---|
771 | * Get the define corresponding to a given iprt status code.
|
---|
772 | *
|
---|
773 | * @returns Pointer to read-only string with the \#define identifier.
|
---|
774 | * @param rc The status code.
|
---|
775 | */
|
---|
776 | #define RTErrGetDefine(rc) (RTErrGet(rc)->pszDefine)
|
---|
777 |
|
---|
778 | /**
|
---|
779 | * Get the short description corresponding to a given iprt status code.
|
---|
780 | *
|
---|
781 | * @returns Pointer to read-only string with the description.
|
---|
782 | * @param rc The status code.
|
---|
783 | */
|
---|
784 | #define RTErrGetShort(rc) (RTErrGet(rc)->pszMsgShort)
|
---|
785 |
|
---|
786 | /**
|
---|
787 | * Get the full description corresponding to a given iprt status code.
|
---|
788 | *
|
---|
789 | * @returns Pointer to read-only string with the description.
|
---|
790 | * @param rc The status code.
|
---|
791 | */
|
---|
792 | #define RTErrGetFull(rc) (RTErrGet(rc)->pszMsgFull)
|
---|
793 |
|
---|
794 | #ifdef __WIN__
|
---|
795 | /**
|
---|
796 | * Windows error code message.
|
---|
797 | */
|
---|
798 | typedef struct RTWINERRMSG
|
---|
799 | {
|
---|
800 | /** Pointer to the full message string. */
|
---|
801 | const char *pszMsgFull;
|
---|
802 | /** Pointer to the define string. */
|
---|
803 | const char *pszDefine;
|
---|
804 | /** Error code number. */
|
---|
805 | long iCode;
|
---|
806 | } RTWINERRMSG;
|
---|
807 | /** Pointer to Windows error code message. */
|
---|
808 | typedef RTWINERRMSG *PRTWINERRMSG;
|
---|
809 | /** Pointer to const Windows error code message. */
|
---|
810 | typedef const RTWINERRMSG *PCRTWINERRMSG;
|
---|
811 |
|
---|
812 | /**
|
---|
813 | * Get the message structure corresponding to a given Windows error code.
|
---|
814 | *
|
---|
815 | * @returns Pointer to read-only message description.
|
---|
816 | * @param rc The status code.
|
---|
817 | */
|
---|
818 | RTDECL(PCRTWINERRMSG) RTErrWinGet(long rc);
|
---|
819 | #endif /* __WIN__ */
|
---|
820 |
|
---|
821 | #endif /* IN_RING3 */
|
---|
822 |
|
---|
823 | /** @} */
|
---|
824 |
|
---|
825 | /** @} */
|
---|
826 |
|
---|
827 | __END_DECLS
|
---|
828 |
|
---|
829 | #endif
|
---|
830 |
|
---|