2 * transsip - the telephony network
3 * By Daniel Borkmann <daniel@transsip.org>
4 * Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 * Swiss federal institute of technology (ETH Zurich)
6 * Subject to the GPL, version 2.
21 static inline void error_and_die(int status
, char *msg
, ...)
25 vfprintf(stderr
, msg
, vl
);
30 static inline void die(void)
35 static inline void panic(char *msg
, ...)
39 vfprintf(stderr
, msg
, vl
);
44 #define syslog_panic(msg...) \
46 syslog(LOG_ERR, ##msg); \
50 static inline void whine(char *msg
, ...)
54 vfprintf(stderr
, msg
, vl
);
58 #define syslog_whine(msg...) \
60 syslog(LOG_WARNING, ##msg); \
63 static inline void info(char *msg
, ...)
67 vfprintf(stdout
, msg
, vl
);
71 #define syslog_info(msg...) \
73 syslog(LOG_INFO, ##msg); \
76 static inline void BUG(char *msg
, ...)
81 vfprintf(stderr
, msg
, vl
);
86 static inline void BUG_ON(int cond
, char *msg
, ...)
92 vfprintf(stderr
, msg
, vl
);
99 static inline void debug(char *msg
, ...)
103 vfprintf(stderr
, msg
, vl
);
108 static inline void debug(char *msg
, ...)
114 static inline void puke_and_die(int status
, char *msg
, ...)
118 vfprintf(stderr
, msg
, vl
);
121 fprintf(stderr
, ": %s\n", strerror(errno
));