VirtualBox

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

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

Added RTErrConvertFromDarwin() as a merge of the IO, Kern and COM versions.

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