1/*
2 * Copyright 2003-2010, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <stdarg.h>
8
9#include <boot/platform.h>
10#include <boot/stdio.h>
11#include <platform/openfirmware/openfirmware.h>
12
13
14extern "C" void
15panic(const char* format, ...)
16{
17	// TODO: this works only after console_init() was called.
18	va_list list;
19
20	puts("*** PANIC ***");
21
22	va_start(list, format);
23	vprintf(format, list);
24	va_end(list);
25
26	of_exit();
27}
28
29
30extern "C" void
31dprintf(const char* format, ...)
32{
33	va_list list;
34
35	va_start(list, format);
36	vprintf(format, list);
37	va_end(list);
38}
39
40
41char*
42platform_debug_get_log_buffer(size_t* _size)
43{
44	return NULL;
45}
46