flinklib
flinklib: flink C library for Linux
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
error.h
Go to the documentation of this file.
1 /*******************************************************************
2  * _________ _____ _____ ____ _____ ___ ____ *
3  * |_ ___ | |_ _| |_ _| |_ \|_ _| |_ ||_ _| *
4  * | |_ \_| | | | | | \ | | | |_/ / *
5  * | _| | | _ | | | |\ \| | | __'. *
6  * _| |_ _| |__/ | _| |_ _| |_\ |_ _| | \ \_ *
7  * |_____| |________| |_____| |_____|\____| |____||____| *
8  * *
9  *******************************************************************
10  * *
11  * fLink userspace library, error handling *
12  * *
13  *******************************************************************/
14 
21 #ifndef FLINKLIB_ERROR_H_
22 #define FLINKLIB_ERROR_H_
23 
24 // ############ Errorhandling ############
25 
26 #define FLINK_NOERROR 0x2000 // No error
27 #define FLINK_EUNKNOWN (FLINK_NOERROR + 1) // Unknown error
28 #define FLINK_ENOTSUPPORTED (FLINK_NOERROR + 2) // Not supported
29 #define FLINK_EINVALDEV (FLINK_NOERROR + 3) // Invalid device
30 #define FLINK_EINVALSUBDEV (FLINK_NOERROR + 4) // Invalid subdevice
31 #define FLINK_EINVALCHAN (FLINK_NOERROR + 5) // Invalid channel
32 #define FLINK_ENULLPTR (FLINK_NOERROR + 6) // Null ptr as argument
33 #define FLINK_UNKNOWNIOCTL (FLINK_NOERROR + 7) // Unknown ioctl command
34 #define FLINK_WRONGSUBDEVT (FLINK_NOERROR + 8) // Wrong subdevice type
35 
36 const char* flink_strerror(int e);
37 void flink_perror(const char* p);
38 void libc_error(void);
39 void flink_error(int e);
40 
41 #endif // FLINKLIB_ERROR_H_
const char * flink_strerror(int e)
Definition: error.c:42
void flink_perror(const char *p)
Definition: error.c:50
void libc_error(void)
Definition: error.c:56
void flink_error(int e)
Definition: error.c:64