VirtualBox

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

Last change on this file since 19177 was 18909, checked in by vboxsync, 16 years ago

Runtime: Add RTFileAio API for review

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 37.5 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
266/** On windows COM errors are part of the Windows error database. */
267typedef RTWINERRMSG RTCOMERRMSG;
268
269#else /* !RT_OS_WINDOWS */
270
271/**
272 * COM/XPCOM error code message.
273 */
274typedef struct RTCOMERRMSG
275{
276 /** Pointer to the full message string. */
277 const char *pszMsgFull;
278 /** Pointer to the define string. */
279 const char *pszDefine;
280 /** Error code number. */
281 uint32_t iCode;
282} RTCOMERRMSG;
283#endif /* !RT_OS_WINDOWS */
284/** Pointer to a XPCOM/COM error code message. */
285typedef RTCOMERRMSG *PRTCOMERRMSG;
286/** Pointer to const a XPCOM/COM error code message. */
287typedef const RTCOMERRMSG *PCRTCOMERRMSG;
288
289/**
290 * Get the message structure corresponding to a given COM/XPCOM error code.
291 *
292 * @returns Pointer to read-only message description.
293 * @param rc The status code.
294 */
295RTDECL(PCRTCOMERRMSG) RTErrCOMGet(uint32_t rc);
296
297#endif /* IN_RING3 */
298
299/** @} */
300
301
302/* SED-START */
303
304/** @name Misc. Status Codes
305 * @{
306 */
307/** Success. */
308#define VINF_SUCCESS 0
309
310/** General failure - DON'T USE THIS!!! */
311#define VERR_GENERAL_FAILURE (-1)
312/** Invalid parameter. */
313#define VERR_INVALID_PARAMETER (-2)
314/** Invalid parameter. */
315#define VWRN_INVALID_PARAMETER 2
316/** Invalid magic or cookie. */
317#define VERR_INVALID_MAGIC (-3)
318/** Invalid magic or cookie. */
319#define VWRN_INVALID_MAGIC 3
320/** Invalid loader handle. */
321#define VERR_INVALID_HANDLE (-4)
322/** Invalid loader handle. */
323#define VWRN_INVALID_HANDLE 4
324/** Failed to lock the address range. */
325#define VERR_LOCK_FAILED (-5)
326/** Invalid memory pointer. */
327#define VERR_INVALID_POINTER (-6)
328/** Failed to patch the IDT. */
329#define VERR_IDT_FAILED (-7)
330/** Memory allocation failed. */
331#define VERR_NO_MEMORY (-8)
332/** Already loaded. */
333#define VERR_ALREADY_LOADED (-9)
334/** Permission denied. */
335#define VERR_PERMISSION_DENIED (-10)
336/** Version mismatch. */
337#define VERR_VERSION_MISMATCH (-11)
338/** The request function is not implemented. */
339#define VERR_NOT_IMPLEMENTED (-12)
340
341/** Failed to allocate temporary memory. */
342#define VERR_NO_TMP_MEMORY (-20)
343/** Invalid file mode mask (RTFMODE). */
344#define VERR_INVALID_FMODE (-21)
345/** Incorrect call order. */
346#define VERR_WRONG_ORDER (-22)
347/** There is no TLS (thread local storage) available for storing the current thread. */
348#define VERR_NO_TLS_FOR_SELF (-23)
349/** Failed to set the TLS (thread local storage) entry which points to our thread structure. */
350#define VERR_FAILED_TO_SET_SELF_TLS (-24)
351/** Not able to allocate contiguous memory. */
352#define VERR_NO_CONT_MEMORY (-26)
353/** No memory available for page table or page directory. */
354#define VERR_NO_PAGE_MEMORY (-27)
355/** Already initialized. */
356#define VINF_ALREADY_INITIALIZED 28
357/** The specified thread is dead. */
358#define VERR_THREAD_IS_DEAD (-29)
359/** The specified thread is not waitable. */
360#define VERR_THREAD_NOT_WAITABLE (-30)
361/** Pagetable not present. */
362#define VERR_PAGE_TABLE_NOT_PRESENT (-31)
363
364/** The per process timer is busy. */
365#define VERR_TIMER_BUSY (-33)
366/** Address conflict. */
367#define VERR_ADDRESS_CONFLICT (-34)
368/** Unresolved (unknown) host platform error. */
369#define VERR_UNRESOLVED_ERROR (-35)
370/** Invalid function. */
371#define VERR_INVALID_FUNCTION (-36)
372/** Not supported. */
373#define VERR_NOT_SUPPORTED (-37)
374/** Access denied. */
375#define VERR_ACCESS_DENIED (-38)
376/** Call interrupted. */
377#define VERR_INTERRUPTED (-39)
378/** Timeout. */
379#define VERR_TIMEOUT (-40)
380/** Buffer too small to save result. */
381#define VERR_BUFFER_OVERFLOW (-41)
382/** Buffer too small to save result. */
383#define VINF_BUFFER_OVERFLOW 41
384/** Data size overflow. */
385#define VERR_TOO_MUCH_DATA (-42)
386/** Max threads number reached. */
387#define VERR_MAX_THRDS_REACHED (-43)
388/** Max process number reached. */
389#define VERR_MAX_PROCS_REACHED (-44)
390/** The recipient process has refused the signal. */
391#define VERR_SIGNAL_REFUSED (-45)
392/** A signal is already pending. */
393#define VERR_SIGNAL_PENDING (-46)
394/** The signal being posted is not correct. */
395#define VERR_SIGNAL_INVALID (-47)
396/** The state changed.
397 * This is a generic error message and needs a context to make sense. */
398#define VERR_STATE_CHANGED (-48)
399/** Warning, the state changed.
400 * This is a generic error message and needs a context to make sense. */
401#define VWRN_STATE_CHANGED 48
402/** Error while parsing UUID string */
403#define VERR_INVALID_UUID_FORMAT (-49)
404/** The specified process was not found. */
405#define VERR_PROCESS_NOT_FOUND (-50)
406/** The process specified to a non-block wait had not exitted. */
407#define VERR_PROCESS_RUNNING (-51)
408/** Retry the operation. */
409#define VERR_TRY_AGAIN (-52)
410/** Retry the operation. */
411#define VINF_TRY_AGAIN 52
412/** Generic parse error. */
413#define VERR_PARSE_ERROR (-53)
414/** Value out of range. */
415#define VERR_OUT_OF_RANGE (-54)
416/** A numeric convertion encountered a value which was too big for the target. */
417#define VERR_NUMBER_TOO_BIG (-55)
418/** A numeric convertion encountered a value which was too big for the target. */
419#define VWRN_NUMBER_TOO_BIG 55
420/** The number begin converted (string) contained no digits. */
421#define VERR_NO_DIGITS (-56)
422/** The number begin converted (string) contained no digits. */
423#define VWRN_NO_DIGITS 56
424/** Encountered a '-' during convertion to an unsigned value. */
425#define VERR_NEGATIVE_UNSIGNED (-57)
426/** Encountered a '-' during convertion to an unsigned value. */
427#define VWRN_NEGATIVE_UNSIGNED 57
428/** Error while characters translation (unicode and so). */
429#define VERR_NO_TRANSLATION (-58)
430/** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */
431#define VERR_CODE_POINT_ENDIAN_INDICATOR (-59)
432/** Encountered unicode code point in the surrogate range (0xd800 to 0xdfff). */
433#define VERR_CODE_POINT_SURROGATE (-60)
434/** A string claiming to be UTF-8 is incorrectly encoded. */
435#define VERR_INVALID_UTF8_ENCODING (-61)
436/** Ad string claiming to be in UTF-16 is incorrectly encoded. */
437#define VERR_INVALID_UTF16_ENCODING (-62)
438/** Encountered a unicode code point which cannot be represented as UTF-16. */
439#define VERR_CANT_RECODE_AS_UTF16 (-63)
440/** Got an out of memory condition trying to allocate a string. */
441#define VERR_NO_STR_MEMORY (-64)
442/** Got an out of memory condition trying to allocate a UTF-16 (/UCS-2) string. */
443#define VERR_NO_UTF16_MEMORY (-65)
444/** Get an out of memory condition trying to allocate a code point array. */
445#define VERR_NO_CODE_POINT_MEMORY (-66)
446/** Can't free the memory because it's used in mapping. */
447#define VERR_MEMORY_BUSY (-67)
448/** The timer can't be started because it's already active. */
449#define VERR_TIMER_ACTIVE (-68)
450/** The timer can't be stopped because i's already suspended. */
451#define VERR_TIMER_SUSPENDED (-69)
452/** The operation was cancelled by the user (copy) or another thread (local ipc). */
453#define VERR_CANCELLED (-70)
454/** Failed to initialize a memory object.
455 * Exactly what this means is OS specific. */
456#define VERR_MEMOBJ_INIT_FAILED (-71)
457/** Out of memory condition when allocating memory with low physical backing. */
458#define VERR_NO_LOW_MEMORY (-72)
459/** Out of memory condition when allocating physical memory (without mapping). */
460#define VERR_NO_PHYS_MEMORY (-73)
461/** The address (virtual or physical) is too big. */
462#define VERR_ADDRESS_TOO_BIG (-74)
463/** Failed to map a memory object. */
464#define VERR_MAP_FAILED (-75)
465/** Trailing characters. */
466#define VERR_TRAILING_CHARS (-76)
467/** Trailing characters. */
468#define VWRN_TRAILING_CHARS 76
469/** Trailing spaces. */
470#define VERR_TRAILING_SPACES (-77)
471/** Trailing spaces. */
472#define VWRN_TRAILING_SPACES 77
473/** Generic not found error. */
474#define VERR_NOT_FOUND (-78)
475/** Generic not found warning. */
476#define VWRN_NOT_FOUND 78
477/** Generic invalid state error. */
478#define VERR_INVALID_STATE (-79)
479/** Generic invalid state warning. */
480#define VWRN_INVALID_STATE 79
481/** Generic out of resources error. */
482#define VERR_OUT_OF_RESOURCES (-80)
483/** Generic out of resources warning. */
484#define VWRN_OUT_OF_RESOURCES 80
485/** No more handles available, too many open handles. */
486#define VERR_NO_MORE_HANDLES (-81)
487/** Preemption is disabled.
488 * The requested operation can only be performed when preemption is enabled. */
489#define VERR_PREEMPT_DISABLED (-82)
490/** End of string. */
491#define VERR_END_OF_STRING (-83)
492/** End of string. */
493#define VINF_END_OF_STRING 83
494/** A page count is ouf of range. */
495#define VERR_PAGE_COUNT_OUT_OF_RANGE (-84)
496/** Generic object destroyed status. */
497#define VERR_OBJECT_DESTROYED (-85)
498/** Generic object was destroyed by the call status. */
499#define VINF_OBJECT_DESTROYED 85
500/** Generic dangling objects status. */
501#define VERR_DANGLING_OBJECTS (-86)
502/** Generic dangling objects status. */
503#define VWRN_DANGLING_OBJECTS 86
504/** Invalid Base64 encoding. */
505#define VERR_INVALID_BASE64_ENCODING (-87)
506/** @} */
507
508
509/** @name Common File/Disk/Pipe/etc Status Codes
510 * @{
511 */
512/** Unresolved (unknown) file i/o error. */
513#define VERR_FILE_IO_ERROR (-100)
514/** File/Device open failed. */
515#define VERR_OPEN_FAILED (-101)
516/** File not found. */
517#define VERR_FILE_NOT_FOUND (-102)
518/** Path not found. */
519#define VERR_PATH_NOT_FOUND (-103)
520/** Invalid (malformed) file/path name. */
521#define VERR_INVALID_NAME (-104)
522/** File/Device already exists. */
523#define VERR_ALREADY_EXISTS (-105)
524/** Too many open files. */
525#define VERR_TOO_MANY_OPEN_FILES (-106)
526/** Seek error. */
527#define VERR_SEEK (-107)
528/** Seek below file start. */
529#define VERR_NEGATIVE_SEEK (-108)
530/** Trying to seek on device. */
531#define VERR_SEEK_ON_DEVICE (-109)
532/** Reached the end of the file. */
533#define VERR_EOF (-110)
534/** Reached the end of the file. */
535#define VINF_EOF 110
536/** Generic file read error. */
537#define VERR_READ_ERROR (-111)
538/** Generic file write error. */
539#define VERR_WRITE_ERROR (-112)
540/** Write protect error. */
541#define VERR_WRITE_PROTECT (-113)
542/** Sharing violation, file is being used by another process. */
543#define VERR_SHARING_VIOLATION (-114)
544/** Unable to lock a region of a file. */
545#define VERR_FILE_LOCK_FAILED (-115)
546/** File access error, another process has locked a portion of the file. */
547#define VERR_FILE_LOCK_VIOLATION (-116)
548/** File or directory can't be created. */
549#define VERR_CANT_CREATE (-117)
550/** Directory can't be deleted. */
551#define VERR_CANT_DELETE_DIRECTORY (-118)
552/** Can't move file to another disk. */
553#define VERR_NOT_SAME_DEVICE (-119)
554/** The filename or extension is too long. */
555#define VERR_FILENAME_TOO_LONG (-120)
556/** Media not present in drive. */
557#define VERR_MEDIA_NOT_PRESENT (-121)
558/** The type of media was not recognized. Not formatted? */
559#define VERR_MEDIA_NOT_RECOGNIZED (-122)
560/** Can't unlock - region was not locked. */
561#define VERR_FILE_NOT_LOCKED (-123)
562/** Unrecoverable error: lock was lost. */
563#define VERR_FILE_LOCK_LOST (-124)
564/** Can't delete directory with files. */
565#define VERR_DIR_NOT_EMPTY (-125)
566/** A directory operation was attempted on a non-directory object. */
567#define VERR_NOT_A_DIRECTORY (-126)
568/** A non-directory operation was attempted on a directory object. */
569#define VERR_IS_A_DIRECTORY (-127)
570/** Tried to grow a file beyond the limit imposed by the process or the filesystem. */
571#define VERR_FILE_TOO_BIG (-128)
572/** No pending request the aio context has to wait for completion. */
573#define VERR_FILE_AIO_NO_REQUEST (-129)
574/** The request could not be canceled because it is already processed. */
575#define VERR_FILE_AIO_IN_PROGRESS (-130)
576/** The request could not be canceled because it already completed. */
577#define VERR_FILE_AIO_COMPLETED (-131)
578/** The I/O context couldn't be destroyed because there are still pending requests. */
579#define VERR_FILE_AIO_BUSY (-132)
580/** @} */
581
582
583/** @name Generic Filesystem I/O Status Codes
584 * @{
585 */
586/** Unresolved (unknown) disk i/o error. */
587#define VERR_DISK_IO_ERROR (-150)
588/** Invalid drive number. */
589#define VERR_INVALID_DRIVE (-151)
590/** Disk is full. */
591#define VERR_DISK_FULL (-152)
592/** Disk was changed. */
593#define VERR_DISK_CHANGE (-153)
594/** Drive is locked. */
595#define VERR_DRIVE_LOCKED (-154)
596/** The specified disk or diskette cannot be accessed. */
597#define VERR_DISK_INVALID_FORMAT (-155)
598/** Too many symbolic links. */
599#define VERR_TOO_MANY_SYMLINKS (-156)
600/** @} */
601
602
603/** @name Generic Directory Enumeration Status Codes
604 * @{
605 */
606/** Unresolved (unknown) search error. */
607#define VERR_SEARCH_ERROR (-200)
608/** No more files found. */
609#define VERR_NO_MORE_FILES (-201)
610/** No more search handles available. */
611#define VERR_NO_MORE_SEARCH_HANDLES (-202)
612/** RTDirReadEx() failed to retrieve the extra data which was requested. */
613#define VWRN_NO_DIRENT_INFO 203
614/** @} */
615
616
617/** @name Internal Processing Errors
618 * @{
619 */
620/** Internal error - we're screwed if this happens. */
621#define VERR_INTERNAL_ERROR (-225)
622/** Internal error no. 2. */
623#define VERR_INTERNAL_ERROR_2 (-226)
624/** Internal error no. 3. */
625#define VERR_INTERNAL_ERROR_3 (-227)
626/** Internal error no. 4. */
627#define VERR_INTERNAL_ERROR_4 (-228)
628/** Internal error no. 5. */
629#define VERR_INTERNAL_ERROR_5 (-229)
630/** Internal error: Unexpected status code. */
631#define VERR_IPE_UNEXPECTED_STATUS (-230)
632/** Internal error: Unexpected status code. */
633#define VERR_IPE_UNEXPECTED_INFO_STATUS (-231)
634/** Internal error: Unexpected status code. */
635#define VERR_IPE_UNEXPECTED_ERROR_STATUS (-232)
636/** @} */
637
638
639/** @name Generic Device I/O Status Codes
640 * @{
641 */
642/** Unresolved (unknown) device i/o error. */
643#define VERR_DEV_IO_ERROR (-250)
644/** Device i/o: Bad unit. */
645#define VERR_IO_BAD_UNIT (-251)
646/** Device i/o: Not ready. */
647#define VERR_IO_NOT_READY (-252)
648/** Device i/o: Bad command. */
649#define VERR_IO_BAD_COMMAND (-253)
650/** Device i/o: CRC error. */
651#define VERR_IO_CRC (-254)
652/** Device i/o: Bad length. */
653#define VERR_IO_BAD_LENGTH (-255)
654/** Device i/o: Sector not found. */
655#define VERR_IO_SECTOR_NOT_FOUND (-256)
656/** Device i/o: General failure. */
657#define VERR_IO_GEN_FAILURE (-257)
658/** @} */
659
660
661/** @name Generic Pipe I/O Status Codes
662 * @{
663 */
664/** Unresolved (unknown) pipe i/o error. */
665#define VERR_PIPE_IO_ERROR (-300)
666/** Broken pipe. */
667#define VERR_BROKEN_PIPE (-301)
668/** Bad pipe. */
669#define VERR_BAD_PIPE (-302)
670/** Pipe is busy. */
671#define VERR_PIPE_BUSY (-303)
672/** No data in pipe. */
673#define VERR_NO_DATA (-304)
674/** Pipe is not connected. */
675#define VERR_PIPE_NOT_CONNECTED (-305)
676/** More data available in pipe. */
677#define VERR_MORE_DATA (-306)
678/** @} */
679
680
681/** @name Generic Semaphores Status Codes
682 * @{
683 */
684/** Unresolved (unknown) semaphore error. */
685#define VERR_SEM_ERROR (-350)
686/** Too many semaphores. */
687#define VERR_TOO_MANY_SEMAPHORES (-351)
688/** Exclusive semaphore is owned by another process. */
689#define VERR_EXCL_SEM_ALREADY_OWNED (-352)
690/** The semaphore is set and cannot be closed. */
691#define VERR_SEM_IS_SET (-353)
692/** The semaphore cannot be set again. */
693#define VERR_TOO_MANY_SEM_REQUESTS (-354)
694/** Attempt to release mutex not owned by caller. */
695#define VERR_NOT_OWNER (-355)
696/** The semaphore has been opened too many times. */
697#define VERR_TOO_MANY_OPENS (-356)
698/** The maximum posts for the event semaphore has been reached. */
699#define VERR_TOO_MANY_POSTS (-357)
700/** The event semaphore has already been posted. */
701#define VERR_ALREADY_POSTED (-358)
702/** The event semaphore has already been reset. */
703#define VERR_ALREADY_RESET (-359)
704/** The semaphore is in use. */
705#define VERR_SEM_BUSY (-360)
706/** The previous ownership of this semaphore has ended. */
707#define VERR_SEM_OWNER_DIED (-361)
708/** Failed to open semaphore by name - not found. */
709#define VERR_SEM_NOT_FOUND (-362)
710/** Semaphore destroyed while waiting. */
711#define VERR_SEM_DESTROYED (-363)
712/** Nested ownership requests are not permitted for this semaphore type. */
713#define VERR_SEM_NESTED (-364)
714/** Deadlock detected. */
715#define VERR_DEADLOCK (-365)
716/** Ping-Pong listen or speak out of turn error. */
717#define VERR_SEM_OUT_OF_TURN (-366)
718/** @} */
719
720
721/** @name Generic Network I/O Status Codes
722 * @{
723 */
724/** Unresolved (unknown) network error. */
725#define VERR_NET_IO_ERROR (-400)
726/** The network is busy or is out of resources. */
727#define VERR_NET_OUT_OF_RESOURCES (-401)
728/** Net host name not found. */
729#define VERR_NET_HOST_NOT_FOUND (-402)
730/** Network path not found. */
731#define VERR_NET_PATH_NOT_FOUND (-403)
732/** General network printing error. */
733#define VERR_NET_PRINT_ERROR (-404)
734/** The machine is not on the network. */
735#define VERR_NET_NO_NETWORK (-405)
736/** Name is not unique on the network. */
737#define VERR_NET_NOT_UNIQUE_NAME (-406)
738
739/* These are BSD networking error codes - numbers correspond, don't mess! */
740/** Operation in progress. */
741#define VERR_NET_IN_PROGRESS (-436)
742/** Operation already in progress. */
743#define VERR_NET_ALREADY_IN_PROGRESS (-437)
744/** Attempted socket operation with a non-socket handle.
745 * (This includes closed handles.) */
746#define VERR_NET_NOT_SOCKET (-438)
747/** Destination address required. */
748#define VERR_NET_DEST_ADDRESS_REQUIRED (-439)
749/** Message too long. */
750#define VERR_NET_MSG_SIZE (-440)
751/** Protocol wrong type for socket. */
752#define VERR_NET_PROTOCOL_TYPE (-441)
753/** Protocol not available. */
754#define VERR_NET_PROTOCOL_NOT_AVAILABLE (-442)
755/** Protocol not supported. */
756#define VERR_NET_PROTOCOL_NOT_SUPPORTED (-443)
757/** Socket type not supported. */
758#define VERR_NET_SOCKET_TYPE_NOT_SUPPORTED (-444)
759/** Operation not supported. */
760#define VERR_NET_OPERATION_NOT_SUPPORTED (-445)
761/** Protocol family not supported. */
762#define VERR_NET_PROTOCOL_FAMILY_NOT_SUPPORTED (-446)
763/** Address family not supported by protocol family. */
764#define VERR_NET_ADDRESS_FAMILY_NOT_SUPPORTED (-447)
765/** Address already in use. */
766#define VERR_NET_ADDRESS_IN_USE (-448)
767/** Can't assign requested address. */
768#define VERR_NET_ADDRESS_NOT_AVAILABLE (-449)
769/** Network is down. */
770#define VERR_NET_DOWN (-450)
771/** Network is unreachable. */
772#define VERR_NET_UNREACHABLE (-451)
773/** Network dropped connection on reset. */
774#define VERR_NET_CONNECTION_RESET (-452)
775/** Software caused connection abort. */
776#define VERR_NET_CONNECTION_ABORTED (-453)
777/** Connection reset by peer. */
778#define VERR_NET_CONNECTION_RESET_BY_PEER (-454)
779/** No buffer space available. */
780#define VERR_NET_NO_BUFFER_SPACE (-455)
781/** Socket is already connected. */
782#define VERR_NET_ALREADY_CONNECTED (-456)
783/** Socket is not connected. */
784#define VERR_NET_NOT_CONNECTED (-457)
785/** Can't send after socket shutdown. */
786#define VERR_NET_SHUTDOWN (-458)
787/** Too many references: can't splice. */
788#define VERR_NET_TOO_MANY_REFERENCES (-459)
789/** Too many references: can't splice. */
790#define VERR_NET_CONNECTION_TIMED_OUT (-460)
791/** Connection refused. */
792#define VERR_NET_CONNECTION_REFUSED (-461)
793/* ELOOP is not net. */
794/* ENAMETOOLONG is not net. */
795/** Host is down. */
796#define VERR_NET_HOST_DOWN (-464)
797/** No route to host. */
798#define VERR_NET_HOST_UNREACHABLE (-465)
799/** Protocol error. */
800#define VERR_NET_PROTOCOL_ERROR (-466)
801/** @} */
802
803
804/** @name TCP Status Codes
805 * @{
806 */
807/** Stop the TCP server. */
808#define VERR_TCP_SERVER_STOP (-500)
809/** The server was stopped. */
810#define VINF_TCP_SERVER_STOP 500
811/** @} */
812
813
814/** @name L4 Specific Status Codes
815 * @{
816 */
817/** Invalid offset in an L4 dataspace */
818#define VERR_L4_INVALID_DS_OFFSET (-550)
819/** IPC error */
820#define VERR_IPC (-551)
821/** Item already used */
822#define VERR_RESOURCE_IN_USE (-552)
823/** Source/destination not found */
824#define VERR_IPC_PROCESS_NOT_FOUND (-553)
825/** Receive timeout */
826#define VERR_IPC_RECEIVE_TIMEOUT (-554)
827/** Send timeout */
828#define VERR_IPC_SEND_TIMEOUT (-555)
829/** Receive cancelled */
830#define VERR_IPC_RECEIVE_CANCELLED (-556)
831/** Send cancelled */
832#define VERR_IPC_SEND_CANCELLED (-557)
833/** Receive aborted */
834#define VERR_IPC_RECEIVE_ABORTED (-558)
835/** Send aborted */
836#define VERR_IPC_SEND_ABORTED (-559)
837/** Couldn't map pages during receive */
838#define VERR_IPC_RECEIVE_MAP_FAILED (-560)
839/** Couldn't map pages during send */
840#define VERR_IPC_SEND_MAP_FAILED (-561)
841/** Send pagefault timeout in receive */
842#define VERR_IPC_RECEIVE_SEND_PF_TIMEOUT (-562)
843/** Send pagefault timeout in send */
844#define VERR_IPC_SEND_SEND_PF_TIMEOUT (-563)
845/** (One) receive buffer was too small, or too few buffers */
846#define VINF_IPC_RECEIVE_MSG_CUT 564
847/** (One) send buffer was too small, or too few buffers */
848#define VINF_IPC_SEND_MSG_CUT 565
849/** Dataspace manager server not found */
850#define VERR_L4_DS_MANAGER_NOT_FOUND (-566)
851/** @} */
852
853
854/** @name Loader Status Codes.
855 * @{
856 */
857/** Invalid executable signature. */
858#define VERR_INVALID_EXE_SIGNATURE (-600)
859/** The iprt loader recognized a ELF image, but doesn't support loading it. */
860#define VERR_ELF_EXE_NOT_SUPPORTED (-601)
861/** The iprt loader recognized a PE image, but doesn't support loading it. */
862#define VERR_PE_EXE_NOT_SUPPORTED (-602)
863/** The iprt loader recognized a LX image, but doesn't support loading it. */
864#define VERR_LX_EXE_NOT_SUPPORTED (-603)
865/** The iprt loader recognized a LE image, but doesn't support loading it. */
866#define VERR_LE_EXE_NOT_SUPPORTED (-604)
867/** The iprt loader recognized a NE image, but doesn't support loading it. */
868#define VERR_NE_EXE_NOT_SUPPORTED (-605)
869/** The iprt loader recognized a MZ image, but doesn't support loading it. */
870#define VERR_MZ_EXE_NOT_SUPPORTED (-606)
871/** The iprt loader recognized an a.out image, but doesn't support loading it. */
872#define VERR_AOUT_EXE_NOT_SUPPORTED (-607)
873/** Bad executable. */
874#define VERR_BAD_EXE_FORMAT (-608)
875/** Symbol (export) not found. */
876#define VERR_SYMBOL_NOT_FOUND (-609)
877/** Module not found. */
878#define VERR_MODULE_NOT_FOUND (-610)
879/** The loader resolved an external symbol to an address to big for the image format. */
880#define VERR_SYMBOL_VALUE_TOO_BIG (-611)
881/** The image is too big. */
882#define VERR_IMAGE_TOO_BIG (-612)
883/** The image base address is to high for this image type. */
884#define VERR_IMAGE_BASE_TOO_HIGH (-614)
885/** Mismatching architecture. */
886#define VERR_LDR_ARCH_MISMATCH (-615)
887/** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
888#define VERR_LDRPE_DELAY_IMPORT (-620)
889/** The PE loader doesn't have a clue what the security data directory entry is all about. */
890#define VERR_LDRPE_SECURITY (-621)
891/** The PE loader doesn't know how to deal with the global pointer data directory entry yet. */
892#define VERR_LDRPE_GLOBALPTR (-622)
893/** The PE loader doesn't support the TLS data directory yet. */
894#define VERR_LDRPE_TLS (-623)
895/** The PE loader doesn't grok the COM descriptor data directory entry. */
896#define VERR_LDRPE_COM_DESCRIPTOR (-624)
897/** The PE loader encountered an unknown load config directory/header size. */
898#define VERR_LDRPE_LOAD_CONFIG_SIZE (-625)
899/** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
900#define VERR_LDRPE_LOCK_PREFIX_TABLE (-626)
901/** The ELF loader doesn't handle foreign endianness. */
902#define VERR_LDRELF_ODD_ENDIAN (-630)
903/** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
904#define VERR_LDRELF_DYN (-631)
905/** The ELF image is 'executable', the ELF loader can only deal with 'relocatable' images at present. */
906#define VERR_LDRELF_EXEC (-632)
907/** The ELF image was created for an unsupported target machine type. */
908#define VERR_LDRELF_MACHINE (-633)
909/** The ELF version is not supported. */
910#define VERR_LDRELF_VERSION (-634)
911/** The ELF loader cannot handle multiple SYMTAB sections. */
912#define VERR_LDRELF_MULTIPLE_SYMTABS (-635)
913/** The ELF loader encountered a relocation type which is not implemented. */
914#define VERR_LDRELF_RELOCATION_NOT_SUPPORTED (-636)
915/** The ELF loader encountered a bad symbol index. */
916#define VERR_LDRELF_INVALID_SYMBOL_INDEX (-637)
917/** The ELF loader encountered an invalid symbol name offset. */
918#define VERR_LDRELF_INVALID_SYMBOL_NAME_OFFSET (-638)
919/** The ELF loader encountered an invalid relocation offset. */
920#define VERR_LDRELF_INVALID_RELOCATION_OFFSET (-639)
921/** The ELF loader didn't find the symbol/string table for the image. */
922#define VERR_LDRELF_NO_SYMBOL_OR_NO_STRING_TABS (-640)
923/** @}*/
924
925/** @name Debug Info Reader Status Codes.
926 * @{
927 */
928/** The specified segment:offset address was invalid. Typically an attempt at
929 * addressing outside the segment boundrary. */
930#define VERR_DBGMOD_INVALID_ADDRESS (-650)
931/** @} */
932
933/** @name Request Packet Status Codes.
934 * @{
935 */
936/** Invalid RT request type.
937 * For the RTReqAlloc() case, the caller just specified an illegal enmType. For
938 * all the other occurences it means indicates corruption, broken logic, or stupid
939 * interface user. */
940#define VERR_RT_REQUEST_INVALID_TYPE (-700)
941/** Invalid RT request state.
942 * The state of the request packet was not the expected and accepted one(s). Either
943 * the interface user screwed up, or we've got corruption/broken logic. */
944#define VERR_RT_REQUEST_STATE (-701)
945/** Invalid RT request packet.
946 * One or more of the RT controlled packet members didn't contain the correct
947 * values. Some thing's broken. */
948#define VERR_RT_REQUEST_INVALID_PACKAGE (-702)
949/** The status field has not been updated yet as the request is still
950 * pending completion. Someone queried the iStatus field before the request
951 * has been fully processed. */
952#define VERR_RT_REQUEST_STATUS_STILL_PENDING (-703)
953/** The request has been freed, don't read the status now.
954 * Someone is reading the iStatus field of a freed request packet. */
955#define VERR_RT_REQUEST_STATUS_FREED (-704)
956/** @} */
957
958/** @name Environment Status Code
959 * @{
960 */
961/** The specified environment variable was not found. (RTEnvGetEx) */
962#define VERR_ENV_VAR_NOT_FOUND (-750)
963/** The specified environment variable was not found. (RTEnvUnsetEx) */
964#define VINF_ENV_VAR_NOT_FOUND (750)
965/** @} */
966
967/** @name Multiprocessor Status Codes.
968 * @{
969 */
970/** The specified cpu is offline. */
971#define VERR_CPU_OFFLINE (-800)
972/** The specified cpu was not found. */
973#define VERR_CPU_NOT_FOUND (-801)
974/** @} */
975
976/** @name RTGetOpt status codes
977 * @{ */
978/** RTGetOpt: command line option not recognized. */
979#define VERR_GETOPT_UNKNOWN_OPTION (-825)
980/** RTGetOpt: command line option needs argument. */
981#define VERR_GETOPT_REQUIRED_ARGUMENT_MISSING (-826)
982/** RTGetOpt: command line option has argument with bad format. */
983#define VERR_GETOPT_INVALID_ARGUMENT_FORMAT (-827)
984/** RTGetOpt: Not an option. */
985#define VINF_GETOPT_NOT_OPTION 828
986/** @} */
987
988/** @name RTCache status codes
989 * @{ */
990/** RTCache: cache is full. */
991#define VERR_CACHE_FULL (-850)
992/** RTCache: cache is empty. */
993#define VERR_CACHE_EMPTY (-851)
994/** @} */
995
996/* SED-END */
997
998/** @} */
999
1000__END_DECLS
1001
1002#endif
1003
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