panic() now reboots when you press a key.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9959 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-11-15 18:03:56 +00:00
parent 356f4957fa
commit 5d6160d04e
+9 -6
View File
@@ -1,10 +1,11 @@
/* /*
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved. * Copyright 2004, Axel Dörfler, [email protected].
** Distributed under the terms of the Haiku License. * Distributed under the terms of the MIT License.
*/ */
#include "serial.h" #include "serial.h"
#include "keyboard.h"
#include <boot/platform.h> #include <boot/platform.h>
#include <boot/stdio.h> #include <boot/stdio.h>
@@ -27,9 +28,11 @@ panic(const char *format, ...)
vprintf(format, list); vprintf(format, list);
va_end(list); va_end(list);
// ToDo: add "press key to reboot" functionality puts("\nPress key to reboot.");
for (;;)
asm("hlt"); clear_key_buffer();
wait_for_key();
platform_exit();
} }