6 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
7 * Alexander Warg <warg@os.inf.tu-dresden.de>
8 * economic rights: Technische Universität Dresden (Germany)
10 * This file is part of TUD:OS and distributed under the terms of the
11 * GNU General Public License 2.
12 * Please see the COPYING-GPL-2 file for details.
14 * As a special exception, you may use this file as part of a free software
15 * library without restriction. Specifically, if other files instantiate
16 * templates or use macros or inline functions from this file, or you compile
17 * this file and link it with other files to produce an executable, this
18 * file does not by itself cause the resulting executable to be covered by
19 * the GNU General Public License. This exception does not however
20 * invalidate any other reasons why the executable file might be covered by
21 * the GNU General Public License.
25 #include <l4/sys/compiler.h>
28 * \defgroup l4_error_api Error codes
29 * \brief Common error codes.
32 * <c>\#include <l4/sys/err.h></c>
36 * \brief L4 error codes.
37 * \ingroup l4_error_api
39 * Those error codes are used by both the kernel and the user programs.
43 L4_EOK = 0, /**< \brief Ok. */
44 L4_EPERM = 1, /**< \brief No permission. */
45 L4_ENOENT = 2, /**< \brief No such entity. */
46 L4_EIO = 5, /**< \brief I/O error. */
47 L4_EAGAIN = 11, /**< \brief Try again. */
48 L4_ENOMEM = 12, /**< \brief No memory. */
49 L4_EACCESS = 13, /**< \brief Permission denied. */
50 L4_EBUSY = 16, /**< \brief Object currently busy, try later. */
51 L4_EEXIST = 17, /**< \brief Already exists. */
52 L4_ENODEV = 19, /**< \brief No such thing. */
53 L4_EINVAL = 22, /**< \brief Invalid argument. */
54 L4_ERANGE = 34, /**< \brief Range error. */
55 L4_ENAMETOOLONG = 36, /**< \brief Name too long. */
56 L4_ENOSYS = 38, /**< \brief No sys. */
57 L4_EBADPROTO = 39, /**< \brief Unsupported protocol. */
58 L4_EADDRNOTAVAIL = 99, /**< \brief Address not available. */
59 L4_ERRNOMAX = 100, /**< \brief Maximum error value. */
61 L4_ENOREPLY = 1000, /**< \brief No reply. */
62 L4_EMSGTOOSHORT = 1001, /**< \brief Message too short. */
63 L4_EMSGTOOLONG = 1002, /**< \brief Message too long. */
64 L4_EMSGMISSARG = 1003, /**< \brief Message has invalid capability. */
66 L4_EIPC_LO = 2000, /**< \brief Communication error-range low. */
67 L4_EIPC_HI = 2000 + 0x1f, /**< \brief Communication error-range high. */
71 L4_CV char const *l4sys_errtostr(long err) L4_NOTHROW;