mirror of
https://gitlab.labs.nic.cz/labs/bird.git
synced 2024-05-11 16:54:54 +00:00
Merge tag 'v1.6.2' into int-new
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "nest/bird.h"
|
||||
#include "nest/cli.h"
|
||||
@@ -209,6 +210,7 @@ bug(const char *msg, ...)
|
||||
|
||||
va_start(args, msg);
|
||||
vlog(L_BUG[0], msg, args);
|
||||
va_end(args);
|
||||
abort();
|
||||
}
|
||||
|
||||
@@ -226,6 +228,7 @@ die(const char *msg, ...)
|
||||
|
||||
va_start(args, msg);
|
||||
vlog(L_FATAL[0], msg, args);
|
||||
va_end(args);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -312,7 +315,11 @@ log_init_debug(char *f)
|
||||
else if (!*f)
|
||||
dbgf = stderr;
|
||||
else if (!(dbgf = fopen(f, "a")))
|
||||
log(L_ERR "Error opening debug file `%s': %m", f);
|
||||
{
|
||||
/* Cannot use die() nor log() here, logging is not yet initialized */
|
||||
fprintf(stderr, "bird: Unable to open debug file %s: %s\n", f, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
if (dbgf)
|
||||
setvbuf(dbgf, NULL, _IONBF, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user