mirror of
https://github.com/troglobit/finit.git
synced 2026-10-13 10:14:47 +00:00
Refactor to share err/warn log API between daemon and client code
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
-13
@@ -28,7 +28,6 @@
|
||||
#ifdef HAVE_TERMIOS_H
|
||||
#include <poll.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <termios.h>
|
||||
#endif
|
||||
@@ -87,18 +86,6 @@ int ttcooked (void);
|
||||
#define ttcooked() 0
|
||||
#endif
|
||||
|
||||
static __attribute__ ((format (printf, 1, 2))) inline void dbg(char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
if (!debug)
|
||||
return;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
static inline char *strterm(char *str, size_t len)
|
||||
{
|
||||
str[len - 1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user