Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2011 17:23:35 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        <freebsd-hackers@freebsd.org>
Cc:        Garrett Cooper <yanegomi@gmail.com>, devin.teske@fisglobal.com
Subject:   [PATCH] Fix kenv(1) output in w/respect to new boot loader variables
Message-ID:  <02aa01ccc4ff$52db7380$f8925a80$@fisglobal.com>

next in thread | raw e-mail | index | archive | help
------=_NextPart_000_02AB_01CCC4BC.44B881A0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Garrett Cooper and a few others have requested that I write a patch to fix a
regression w/respect to kenv(1) output in FreeBSD-9.0 and HEAD.

The issue is with the new boot loader menu. It adds many loader variables
including ones that contain ANSI color escapes.

Obviously, these ANSI codes don't play well with serial consoles when kenv(1) is
executed without arguments (reports vary as to what happens, but it's never
pretty).

Attached is a patch to the Forth code that clears-out the menu-associated
variables before invoking the kernel.

The net-effect is that kenv(1) no longer reports menu-related variables.

In essence, kenv(1) output should now appear the same as on RELENG_8 (which
lacks the new boot loader and didn't use any such variables). Thus, restoring
serial console glory.
-- 
Devin

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.

------=_NextPart_000_02AB_01CCC4BC.44B881A0
Content-Type: text/plain; name="loader_menu.20110825000410.patch.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="loader_menu.20110825000410.patch.txt"

--- sys/boot/forth/menu.4th.orig	Sat May 28 01:50:38 2011=0A=
+++ sys/boot/forth/menu.4th	Wed Aug 24 23:46:46 2011=0A=
@@ -742,11 +742,10 @@=0A=
 			else=0A=
 				-rot 2drop=0A=
 =0A=
-				\ disable timeout if less than zero=0A=
+				\ boot immediately if less than zero=0A=
 				dup 0< if=0A=
 					drop=0A=
-					0 menu_timeout_enabled !=0A=
-					0 ( assigned to menu_timeout below )=0A=
+					0 boot=0A=
 				then=0A=
 			then=0A=
 		then=0A=
--- sys/boot/forth/menu.4th.8.orig	Sat May 28 01:50:38 2011=0A=
+++ sys/boot/forth/menu.4th.8	Wed Aug 24 23:45:57 2011=0A=
@@ -96,11 +96,15 @@=0A=
 by default) unless a key is pressed.=0A=
 If set to=0A=
 .Dq Li NO=0A=
-(case-insensitive) or=0A=
-.Dq Li -1 ,=0A=
+(case-insensitive)=0A=
 .Ic menu-display=0A=
 will wait for user input and never execute=0A=
 .Ic menu_timeout_command .=0A=
+If set to=0A=
+.Dq Li -1 ,=0A=
+.Ic menu-display=0A=
+will boot immediately, preventing both interruption of the autoboot =
process and=0A=
+escaping to the loader prompt.=0A=
 Default is=0A=
 .Dq Li 10 .=0A=
 See=0A=

------=_NextPart_000_02AB_01CCC4BC.44B881A0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?02aa01ccc4ff$52db7380$f8925a80$>