From 5d6160d04ee607bafd812a08fe1b925abc32ec17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 15 Nov 2004 18:03:56 +0000 Subject: [PATCH] panic() now reboots when you press a key. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9959 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/bios_ia32/debug.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/kernel/boot/platform/bios_ia32/debug.c b/src/kernel/boot/platform/bios_ia32/debug.c index c7a5998f65..a4093f7162 100644 --- a/src/kernel/boot/platform/bios_ia32/debug.c +++ b/src/kernel/boot/platform/bios_ia32/debug.c @@ -1,10 +1,11 @@ /* -** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. -** Distributed under the terms of the Haiku License. -*/ + * Copyright 2004, Axel Dörfler, axeld@pinc-software.de. + * Distributed under the terms of the MIT License. + */ #include "serial.h" +#include "keyboard.h" #include #include @@ -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(); }