panic.c revision 38465
138465Smsmith/*
238465Smsmith * $Id$
338465Smsmith * From: $NetBSD: panic.c,v 1.2 1997/03/22 01:48:36 thorpej Exp $
438465Smsmith */
538465Smsmith
638465Smsmith/*
738465Smsmith * Copyright (c) 1996
838465Smsmith *	Matthias Drochner.  All rights reserved.
938465Smsmith *
1038465Smsmith * Redistribution and use in source and binary forms, with or without
1138465Smsmith * modification, are permitted provided that the following conditions
1238465Smsmith * are met:
1338465Smsmith * 1. Redistributions of source code must retain the above copyright
1438465Smsmith *    notice, this list of conditions and the following disclaimer.
1538465Smsmith * 2. Redistributions in binary form must reproduce the above copyright
1638465Smsmith *    notice, this list of conditions and the following disclaimer in the
1738465Smsmith *    documentation and/or other materials provided with the distribution.
1838465Smsmith * 3. All advertising materials mentioning features or use of this software
1938465Smsmith *    must display the following acknowledgement:
2038465Smsmith *	This product includes software developed for the NetBSD Project
2138465Smsmith *	by Matthias Drochner.
2238465Smsmith * 4. The name of the author may not be used to endorse or promote products
2338465Smsmith *    derived from this software without specific prior written permission.
2438465Smsmith *
2538465Smsmith * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2638465Smsmith * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2738465Smsmith * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2838465Smsmith * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2938465Smsmith * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
3038465Smsmith * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3138465Smsmith * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3238465Smsmith * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3338465Smsmith * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3438465Smsmith * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3538465Smsmith *
3638465Smsmith */
3738465Smsmith
3838465Smsmith
3938465Smsmith#include <stand.h>
4038465Smsmith#include <machine/stdarg.h>
4138465Smsmith
4238465Smsmith__dead void
4338465Smsmithpanic(const char *fmt,...)
4438465Smsmith{
4538465Smsmith	va_list         ap;
4638465Smsmith
4738465Smsmith	printf("panic: ");
4838465Smsmith	va_start(ap, fmt);
4938465Smsmith	printf(fmt, ap);
5038465Smsmith	printf("\n");
5138465Smsmith	va_end(ap);
5238465Smsmith	printf("Press a key to reboot\n");
5338465Smsmith	getchar();
5438465Smsmith
5538465Smsmith	exit(1);
5638465Smsmith}
57