VirtualBox

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

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

VERR_NOT_FOUND (always wanted this).

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