[OpenBIOS] [commit] r1084 - trunk/openbios-devel/forth/admin

repository service svn at openbios.org
Mon Jan 7 13:57:56 CET 2013


Author: mcayland
Date: Mon Jan  7 13:57:56 2013
New Revision: 1084
URL: http://tracker.coreboot.org/trac/openbios/changeset/1084

Log:
Ignore any attempts to emit a character to stdout when stdout is set to 0.

When booting in standard (non-verbose) mode, BootX sets the stdout package
handle to zero to suppress output, yet still continues to invoke the
underlying emit word. This would cause OpenBIOS to become confused, often
getting stuck in a tight loop.

This patch checks the value of stdout before calling the underlying emit
word, and simply returns if stdout is not set.

Based upon an original patch by William Hahne <will07c5 at gmail.com>.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>

Modified:
   trunk/openbios-devel/forth/admin/iocontrol.fs

Modified: trunk/openbios-devel/forth/admin/iocontrol.fs
==============================================================================
--- trunk/openbios-devel/forth/admin/iocontrol.fs	Mon Jan  7 13:57:54 2013	(r1083)
+++ trunk/openbios-devel/forth/admin/iocontrol.fs	Mon Jan  7 13:57:56 2013	(r1084)
@@ -80,8 +80,11 @@
 ;
 
 : io-emit ( char -- )
-  io-out-char c!
-  io-out-char 1 " write" stdout @ $call-method drop
+  stdout @ if
+    io-out-char c!
+    io-out-char 1 " write" stdout @ $call-method
+  then
+  drop
 ;
 
 variable CONSOLE-IN-list



More information about the OpenBIOS mailing list