Add additional explanation to the spontaneous reboot output.
[pintos-anon] / src / threads / init.c
index 8af05ece005e629237e3cd459560369e4cab4ca7..458f67cb2bbd7a7424950d8a219c9f08747c30f8 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include "devices/kbd.h"
+#include "devices/input.h"
 #include "devices/serial.h"
 #include "devices/timer.h"
 #include "devices/vga.h"
@@ -108,6 +109,7 @@ main (void)
   intr_init ();
   timer_init ();
   kbd_init ();
+  input_init ();
 #ifdef USERPROG
   exception_init ();
   syscall_init ();
@@ -365,7 +367,7 @@ usage (void)
 
 
 /* Powers down the machine we're running on,
-   as long as we're running on Bochs or qemu. */
+   as long as we're running on Bochs or QEMU. */
 void
 power_off (void) 
 {
@@ -383,6 +385,8 @@ power_off (void)
 
   for (p = s; *p != '\0'; p++)
     outb (0x8900, *p);
+  asm ("cli; hlt");
+  printf ("still running...\n");
   for (;;);
 }