Compare commits
2 Commits
974aae2ebe
...
70bbdbd8f5
Author | SHA1 | Date |
---|---|---|
|
70bbdbd8f5 | |
|
df8365f0c7 |
|
@ -9,6 +9,7 @@ MAKE_INSTALL_TARGETS=('install-nokeys')
|
||||||
CONFIGURE_OPTIONS=(
|
CONFIGURE_OPTIONS=(
|
||||||
'--sysconfdir=/etc'
|
'--sysconfdir=/etc'
|
||||||
'--sbindir=/usr/bin'
|
'--sbindir=/usr/bin'
|
||||||
|
'--disable-fd-passing'
|
||||||
'CFLAGS=-Wno-deprecated-declarations'
|
'CFLAGS=-Wno-deprecated-declarations'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
static const char* s_ident = nullptr;
|
static const char* s_ident = nullptr;
|
||||||
|
@ -20,11 +21,15 @@ void syslog(int priority, const char* format, ...)
|
||||||
{
|
{
|
||||||
(void)priority;
|
(void)priority;
|
||||||
if (s_ident)
|
if (s_ident)
|
||||||
fprintf(s_log_file, "%s", s_ident);
|
fprintf(s_log_file, "%s: ", s_ident);
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
vfprintf(s_log_file, format, args);
|
vfprintf(s_log_file, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
|
const size_t format_len = strlen(format);
|
||||||
|
if (format_len && format[format_len - 1] != '\n')
|
||||||
|
fputc('\n', s_log_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void closelog()
|
void closelog()
|
||||||
|
|
Loading…
Reference in New Issue