hvf: use yacc & re2c to generate a system config parser
[hvf.git] / include / errno.h
blob45596ab8c6b623a7cfefdf245af06d6a7b0692bc
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
24 #define PTR_ERR(ptr) ((s64) ptr)
25 #define ERR_PTR(err) ((void*) (long) err)
26 #define ERR_CAST(err) ((void*) err)
28 static inline int IS_ERR(void *ptr)
30 return -1024 < PTR_ERR(ptr) && PTR_ERR(ptr) < 0;
33 extern char *errstrings[];
35 #endif