root / Whitix / branches / network / kernel / panic.c
| Revision 26, 1.5 kB (checked in by mwhitworth, 10 months ago) |
|---|
| Line | |
|---|---|
| 1 | /* This file is part of Whitix. |
| 2 | * |
| 3 | * Whitix is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License as published by |
| 5 | * the Free Software Foundation; either version 2 of the License, or |
| 6 | * (at your option) any later version. |
| 7 | * |
| 8 | * Whitix is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License |
| 14 | * along with Whitix; if not, write to the Free Software |
| 15 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 16 | * |
| 17 | */ |
| 18 | |
| 19 | #include <panic.h> |
| 20 | #include <i386/i386.h> |
| 21 | #include <i386/process.h> |
| 22 | #include <console.h> |
| 23 | |
| 24 | /*********************************************************************** |
| 25 | * |
| 26 | * FUNCTION: KernelPanic |
| 27 | * |
| 28 | * DESCRIPTION: Halts the machine. Called in the *worst* cases, when an |
| 29 | * unrecoverable event occurs. CPU faults are dealt with |
| 30 | * differently. |
| 31 | * |
| 32 | * PARAMETERS: message - debug message to print. |
| 33 | * |
| 34 | ***********************************************************************/ |
| 35 | |
| 36 | void KernelPanic(char* message) |
| 37 | { |
| 38 | printf("An unrecoverable error has occured. Please restart your computer.\n " |
| 39 | "If the error occurs again, contact the developers, giving the information on this screen.\n"); |
| 40 | printf("KERNEL PANIC: %s. Halting machine.\n",message); |
| 41 | MachineHalt(); |
| 42 | } |
Note: See TracBrowser
for help on using the browser.