b7d68f0d83d637b32e4e8092487d03abce258a2b
[pintos-anon] / grading / filesys / patches / 00panic.patch
1 This patch forces debug_panic() to terminate Bochs.
2 It is in upstream now, so it is probably time to remove it.
3
4 diff -up pintos/src/lib/debug.c~ pintos/src/lib/debug.c
5 --- pintos/src/lib/debug.c~     2004-09-12 13:14:11.000000000 -0700
6 +++ pintos/src/lib/debug.c      2004-10-17 00:02:32.000000000 -0700
7 @@ -5,6 +5,7 @@
8  #include <stdio.h>
9  #include <string.h>
10  #ifdef KERNEL
11 +#include "threads/init.h"
12  #include "threads/interrupt.h"
13  #include "devices/serial.h"
14  #else
15 @@ -83,7 +84,7 @@ debug_panic (const char *file, int line,
16  
17  #ifdef KERNEL
18    serial_flush ();
19 -  for (;;);
20 +  power_off ();
21  #else
22    exit (1);
23  #endif