diff options
author | Stuart Martin <mister_wavey@rockbox.org> | 2002-04-30 19:23:44 +0000 |
---|---|---|
committer | Stuart Martin <mister_wavey@rockbox.org> | 2002-04-30 19:23:44 +0000 |
commit | 614acaa5311c69b959977fde74cb6764fef17835 (patch) | |
tree | 81296bb7f6e8ee986e58aab302c39a2dd9858fe6 /firmware | |
parent | e6ce5d548593652b3da3e458c85ae6a72996ae23 (diff) | |
download | rockbox-614acaa5311c69b959977fde74cb6764fef17835.tar.gz rockbox-614acaa5311c69b959977fde74cb6764fef17835.zip |
functions for panic functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@340 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/panic.c | 52 |
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 | |||
26 | char panic_buf[128]; | ||
27 | |||
28 | /* | ||
29 | * "Dude. This is pretty fucked-up, right here." | ||
30 | */ | ||
31 | void 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 | */ | ||
43 | void 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 | } | ||