summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/panic.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/firmware/panic.c b/firmware/panic.c
new file mode 100644
index 0000000000..2f8912631d
--- /dev/null
+++ b/firmware/panic.c
@@ -0,0 +1,52 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2002 by wavey@wavey.org
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include <stdio.h>
21#include <stdarg.h>
22#include "panic.h"
23#include "drivers/lcd.h"
24#include "debug.h"
25
26char panic_buf[128];
27
28/*
29 * "Dude. This is pretty fucked-up, right here."
30 */
31void panic( char *message )
32{
33 debug( message );
34
35 /*lcd_string( message ); */
36
37 while( 1 );
38}
39
40/*
41 * "Dude. This is pretty fucked-up, right here."
42 */
43void panicf( char *fmt, ...)
44{
45 va_list ap;
46
47 va_start( ap, fmt );
48 vsprintf( panic_buf, fmt, ap );
49 va_end( ap );
50
51 panic( panic_buf );
52}