]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: Respect loader_color=YES for serial consoles
authorkevans <kevans@FreeBSD.org>
Fri, 20 Sep 2019 19:43:40 +0000 (19:43 +0000)
committerkevans <kevans@FreeBSD.org>
Fri, 20 Sep 2019 19:43:40 +0000 (19:43 +0000)
commit35ca2606382cba137850ba0c1707ce8fea765478
tree763e4d8e923dbaff5083881dd79b9c62ef384af0
parent57bb1dff57ee60eac5aed02043a3903ccce141bc
loader: Respect loader_color=YES for serial consoles

It's not uncommon these days for the terminals attached to serial consoles
to support ANSI escape sequences. However, we assume escape sequences may
break some serial consoles and default to not using them when boot_serial or
boot_multicons (or if console contains "comconsole" in the forth loader) for
broader compatibility. We also have loader_color which can be explicitly set
to "NO" to disable the use of ANSI escape sequences.

The problem is that loader_color=YES gets ignored when boot_serial=YES or
boot_multicons=YES (or when console contains "comconsole" in the forth
loader).

To fix, the existing default behavior remains unchanged when loader_color is
unset, loader_color=NO explicitly disables the use of ANSI escape sequences
still, and the change is that loader_color=YES can now be used to explicitly
allow ANSI escapes when a serial console is enabled.

Submitted by: Ryan Moeller <ryan@ixsystems.com>
Reviewed by: tsoome (forth), kevans (lua)
MFC after: 1 week
Sponsored by: iXsystems, Inc. (Ryan)
Differential Revision: https://reviews.freebsd.org/D21732
stand/forth/color.4th
stand/lua/color.lua