1 /* public domain */
2 
3 #include "includes.h"
4 
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <stdarg.h>
8 #include <unistd.h>
9 
10 #include "log.h"
11 
12 void sshfatal(const char *file, const char *func, int line, int showfunc,
13     LogLevel level, const char *fmt, ...);
14 
15 void
16 sshfatal(const char *file, const char *func, int line, int showfunc,
17     LogLevel level, const char *fmt, ...)
18 {
19 	va_list ap;
20 
21 	if (showfunc)
22 		fprintf(stderr, "%s: ", func);
23 	va_start(ap, fmt);
24 	vfprintf(stderr, fmt, ap);
25 	va_end(ap);
26 	fputc('\n', stderr);
27 	_exit(1);
28 }
29