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:
@@ -1,10 +1,11 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
* Copyright 2004, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "serial.h"
|
||||
#include "keyboard.h"
|
||||
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stdio.h>
|
||||
@@ -27,9 +28,11 @@ panic(const char *format, ...)
|
||||
vprintf(format, list);
|
||||
va_end(list);
|
||||
|
||||
// ToDo: add "press key to reboot" functionality
|
||||
for (;;)
|
||||
asm("hlt");
|
||||
puts("\nPress key to reboot.");
|
||||
|
||||
clear_key_buffer();
|
||||
wait_for_key();
|
||||
platform_exit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user