VirtualBox

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

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

The Giant CDDL Dual-License Header Change.

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