loader: remove shouting from ORB's variable name
[hvf.git] / include / errno.h
blob73481d5749168d33920208c27c64e2dd8b8445b6
1 /*
2 * (C) Copyright 2007-2010 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
4 * This file is released under the GPLv2. See the COPYING file for more
5 * details.
6 */
8 #ifndef __ERRNO_H
9 #define __ERRNO_H
11 #define SUCCESS 0
12 #define ENOMEM 1
13 #define EBUSY 2
14 #define EAGAIN 3
15 #define EINVAL 4
16 #define EEXIST 5
17 #define ENOENT 6
18 #define ESUBENOENT 7
19 #define EUCHECK 8
20 #define EFAULT 9
21 #define EPERM 10
22 #define ECORRUPT 11
23 #define EIO 12
25 #define PTR_ERR(ptr) ((s64) ptr)
26 #define ERR_PTR(err) ((void*) (long) err)
27 #define ERR_CAST(err) ((void*) err)
29 static inline int IS_ERR(void *ptr)
31 return -1024 < PTR_ERR(ptr) && PTR_ERR(ptr) < 0;
34 extern char *errstrings[];
36 #endif