#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>

#define NODEFINE
#include <u.h>
#include <libc.h>

void
pm_panic(char *msg)
{
	char buf[20];
	int pid;

	pid = getpid();
	snprintf(buf, sizeof buf, "%d", (int)pid);
	write(2, "panic ", 7);
	write(2, buf, strlen(buf));
	write(2, ": ", 2);
	write(2, msg, strlen(msg));
	write(2, "\n", 1);
	pm_abort();
}

