Date: Fri, 29 Oct 2010 00:37:35 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r214495 - head/sys/boot/ofw/common Message-ID: <201010290037.o9T0bZei047197@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010290037.o9T0bZei047197>