Author: nwhitehorn
Date: Fri Oct 29 00:37:35 2010
New Revision: 214495
URL: http://svn.freebsd.org/changeset/base/214495
Log:
Fix the printf() in init_heap so that it can run before the console is up.
Pointed out by: marius
Modified:
head/sys/boot/ofw/common/main.c
Modified: head/sys/boot/ofw/common/main.c
==============================================================================
--- head/sys/boot/ofw/common/main.c Fri Oct 29 00:36:44 2010
(r214494)
+++ head/sys/boot/ofw/common/main.c Fri Oct 29 00:37:35 2010
(r214495)
@@ -47,13 +47,17 @@ static char bootargs[128];
#define HEAP_SIZE 0x80000
+#define OF_puts(fd, text) OF_write(fd, text, strlen(text))
+
void
init_heap(void)
{
void *base;
+ ihandle_t stdout;
if ((base = ofw_alloc_heap(HEAP_SIZE)) == (void *)0xffffffff) {
- printf("Heap memory claim failed!\n");
+ OF_getprop(chosen, "stdout", &stdout, sizeof(stdout));
+ OF_puts(stdout, "Heap memory claim failed!\n");
OF_enter();
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"