#include <9pm/u.h>
#include <9pm/libc.h>
#include "dat.h"
#include "fns.h"

void
panic(char *fmt, ...)
{
	char buf[256], buf0[256];
	va_list arg;

	va_start(arg, fmt);
	doprint(buf, buf+sizeof buf, fmt, arg);
	va_end(arg);
	snprint(buf0, sizeof buf0, "panic: %s\n", buf);
	dwrite(buf0);
	abort();
}
