Skip to content
Snippets Groups Projects
Commit ec819737 authored by Beat Küng's avatar Beat Küng Committed by tumbili
Browse files

systemlib: make err() & errx() work for POSIX

parent 458feb0a
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,11 @@ __EXPORT const char *getprogname(void); ...@@ -75,8 +75,11 @@ __EXPORT const char *getprogname(void);
#ifdef __PX4_POSIX #ifdef __PX4_POSIX
#define err(...) ERROR #include <errno.h>
#define errx(...) ERROR #include <px4_tasks.h>
#define err(eval, ...) do { PX4_ERR(__VA_ARGS__); PX4_ERR("Task exited with errno=%i\n", errno); \
px4_task_exit(eval); } while(0)
#define errx(eval, ...) do { PX4_ERR(__VA_ARGS__); px4_task_exit(eval); } while(0)
#define warn(...) PX4_WARN(__VA_ARGS__) #define warn(...) PX4_WARN(__VA_ARGS__)
#define warnx(...) PX4_WARN(__VA_ARGS__) #define warnx(...) PX4_WARN(__VA_ARGS__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment