openssh-portable/regress/misc/sk-dummy/fatal.c

27 lines
518 B
C
Raw Normal View History

/* public domain */
#include "includes.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
2020-10-17 13:47:52 +02:00
void sshfatal(const char *file, const char *func, int line, int showfunc,
LogLevel level, const char *fmt, ...);
void
2020-10-17 13:47:52 +02:00
sshfatal(const char *file, const char *func, int line, int showfunc,
LogLevel level, const char *fmt, ...)
{
va_list ap;
2020-10-17 13:47:52 +02:00
if (showfunc)
fprintf(stderr, "%s: ", func);
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fputc('\n', stderr);
_exit(1);
}