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 void sshfatal(const char *file, const char *func, int line, int showfunc,
11     LogLevel level, const char *fmt, ...);
12 
13 void
14 sshfatal(const char *file, const char *func, int line, int showfunc,
15     LogLevel level, const char *fmt, ...)
16 {
17 	va_list ap;
18 
19 	if (showfunc)
20 		fprintf(stderr, "%s: ", func);
21 	va_start(ap, fmt);
22 	vfprintf(stderr, fmt, ap);
23 	va_end(ap);
24 	fputc('\n', stderr);
25 	_exit(1);
26 }
27