00001 /* 00002 * Copyright Droids Corporation, Microb Technology, Eirbot (2005) 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 * 00018 * Revision : $Id: errno.h,v 1.3 2009-03-15 21:51:14 zer0 Exp $ 00019 * 00020 */ 00021 00022 /* This file contains general errors that can be returned from functions 00023 * We have to be carreful and try to return these error as often as possible 00024 * isntead of a function-specific value 00025 */ 00026 00027 #ifndef _AVERSIVE_ERRNO_H_ 00028 #define _AVERSIVE_ERRNO_H_ 00029 00030 #ifndef HOST_VERSION 00031 00032 /* from avr-libc, does not define a lots of errors */ 00033 #include <errno.h> 00034 00036 #define ESUCCESS 0 00037 00038 #define EPERM 1 00039 00040 #define ENOENT 2 00041 00042 #define EIO 5 00043 00044 #define ENXIO 6 00045 00046 #define E2BIG 7 00047 00048 #define EAGAIN 11 00049 00050 #define ENOMEM 12 00051 00052 #define EFAULT 14 00053 00054 #define EBUSY 16 00055 00056 #define EINVAL 22 00057 00058 /* #define EDOM 33 */ /* in libc */ 00060 /* #define ERANGE 34 */ /* in libc */ 00062 #define ENOTSUP 126 /* the correct number is 128 */ 00063 00064 #define EUNKNOW 127 00065 00066 /* must not be > 127 because it can be stored on an int8_t */ 00067 00068 #else /* HOST_VERSION */ 00069 #include <sys/errno.h> 00070 00071 #endif /* HOST_VERSION */ 00072 00073 #endif /* AVERSIVE_ERRNO_H_ */