1 #ifndef MODINITTOOLS_LOGGING_H
2 #define MODINITTOOLS_LOGGING_H
4 /* Do we use syslog for messages or stderr? */
7 /* Number of times warn() has been called */
10 void fatal(const char *fmt
, ...);
11 void warn(const char *fmt
, ...);
13 #define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__, #ptr)
15 static inline void *do_nofail(void *ptr
, const char *file
, int line
, const char *expr
)
18 fatal("Memory allocation failure %s line %d: %s.\n",
24 #endif /* MODINITTOOLS_LOGGING_H */