[joyos] r304 committed - Fixed panic() as far as I can tell

0 views
Skip to first unread message

jo...@googlecode.com

unread,
Jan 25, 2011, 6:12:24 AM1/25/11
to joyos...@googlegroups.com
Revision: 304
Author: Igute...@gmail.com
Date: Tue Jan 25 03:12:05 2011
Log: Fixed panic() as far as I can tell
http://code.google.com/p/joyos/source/detail?r=304

Modified:
/trunk/src/kern/panic.c

=======================================
--- /trunk/src/kern/panic.c Mon Apr 19 21:40:36 2010
+++ /trunk/src/kern/panic.c Tue Jan 25 03:12:05 2011
@@ -60,16 +60,19 @@
extern struct lock uart_lock;

smash(&uart_lock);
-
- uart_printf_P(PANIC_STRING, (void *)(msg ? msg : ""));
+ uart_printf_P(PSTR(PANIC_STRING),(msg ? msg : ""));
+
+ //old print line... not sure if this is entirely correct, but it
appears to workv
+ //uart_printf_P(PANIC_STRING, (void *)(msg ? msg : ""));

// halt board
halt();
}

#else
-
+#define PANIC_STRING "\npanic: %s\n"
void panic_P (char* msg){
+
printf(PANIC_STRING, msg ? msg : "");
halt();
}

Reply all
Reply to author
Forward
0 new messages