VirtualBox

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

Last change on this file since 2135 was 1532, checked in by vboxsync, 18 years ago

Handle EFBIG on Linux correctly (and try to detect the same situation on
Windows). Provide separate runtime error message, because disk full
doesn't describe the problem (file size limit exceeded). Happens mostly
if people store VDIs on FAT32 partitions.

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