VirtualBox

source: vbox/trunk/include/iprt/err.h@ 5838

Last change on this file since 5838 was 5838, checked in by vboxsync, 17 years ago

Added missing parentheseis (to avoid stuff like '1 VERR_GETOPT_INVALID_ARGUMENT_FORMAT' to be valid code.

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette