Page MenuHomeFreeBSD

loader: Respect loader_color=YES for serial consoles
ClosedPublic

Authored by freqlabs on Sep 20 2019, 7:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 7:19 AM
Unknown Object (File)
Oct 4 2024, 7:57 AM
Unknown Object (File)
Sep 30 2024, 7:13 PM
Unknown Object (File)
Sep 20 2024, 1:48 AM
Unknown Object (File)
Sep 19 2024, 9:16 PM
Unknown Object (File)
Sep 19 2024, 3:20 PM
Unknown Object (File)
Sep 17 2024, 11:06 AM
Unknown Object (File)
Sep 9 2024, 1:59 PM
Subscribers

Details

Summary

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.

Sponsored by: iXsystems, Inc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Looks good for lualoader side.

This revision is now accepted and ready to land.Sep 20 2019, 7:12 PM
stand/forth/color.4th
33 ↗(On Diff #62356)

this is not your code, but could you swap N to t there, since we leave true or false on stack, it is traditionally denoted by char 't''. (N is for signed int).

53 ↗(On Diff #62356)

you can use:
boot_serial? 0= -- this will leave proper value on stack and you can save 4 words:)

Fixed up nearby code as requested

This revision now requires review to proceed.Sep 20 2019, 7:29 PM
This revision is now accepted and ready to land.Sep 20 2019, 7:30 PM

Still OK from lua side -- please commit at will.

Thanks! Can I ask someone with a commit bit to please put this in for me?