VirtualBox

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

Last change on this file since 21217 was 21046, checked in by vboxsync, 15 years ago

IPRT: Added a reader of NM-style map files. (Mainly for linux /proc/kallsyms and System.map.)

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

© 2023 Oracle
ContactPrivacy policyTerms of Use