shithub: pc

ref: cd41a7859d9e011e006e4f328a288ae3b49a779f
dir: /libc/sysfatal.c/

View raw version
#include <u.h>
#include <libc.h>

#include <stdlib.h>

static void
_sysfatalimpl(char *fmt, va_list arg)
{
	vfprint(2, fmt, arg);
	fprint(2, "\n");
	exit(1);
}

void (*_sysfatal)(char *fmt, va_list arg) = _sysfatalimpl;

void
sysfatal(char *fmt, ...)
{
	va_list arg;

	va_start(arg, fmt);
	(*_sysfatal)(fmt, arg);
	va_end(arg);
}