diff options
Diffstat (limited to 'arch/x86/boot/compressed/error.c')
-rw-r--r-- | arch/x86/boot/compressed/error.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/error.c b/arch/x86/boot/compressed/error.c new file mode 100644 index 000000000000..6248740b68b5 --- /dev/null +++ b/arch/x86/boot/compressed/error.c | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * Callers outside of misc.c need access to the error reporting routines, | ||
3 | * but the *_putstr() functions need to stay in misc.c because of how | ||
4 | * memcpy() and memmove() are defined for the compressed boot environment. | ||
5 | */ | ||
6 | #include "misc.h" | ||
7 | |||
8 | void warn(char *m) | ||
9 | { | ||
10 | error_putstr("\n\n"); | ||
11 | error_putstr(m); | ||
12 | error_putstr("\n\n"); | ||
13 | } | ||
14 | |||
15 | void error(char *m) | ||
16 | { | ||
17 | warn(m); | ||
18 | error_putstr(" -- System halted"); | ||
19 | |||
20 | while (1) | ||
21 | asm("hlt"); | ||
22 | } | ||