]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r353872-r353873: lualoader color handling fixes
authorKyle Evans <kevans@FreeBSD.org>
Fri, 25 Oct 2019 00:47:37 +0000 (00:47 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 25 Oct 2019 00:47:37 +0000 (00:47 +0000)
commit7f647351455158790760129eb817342901352a37
tree09fdc0a576d34f019fe05a7f89379196f88f0d8c
parent7c3c7e605c660cdb781ca4337613e5f2604f974a
MFC r353872-r353873: lualoader color handling fixes

r353872:
lualoader: don't botch disabling of color

When colors are disabled, color.escape{fg,bg} would return the passed in
color rather than the proper ANSI sequence for the color.
color.escape{fg,bg} would be wrong.

Instead return '', as the associated reset* functions will also return ''.
This should get rid of the funky '2' and '4' in the kernel selector if
you're booting serial.

r353873:
lualoader: fix setting of loader_color=NO in loader.conf(5)

Previously color.disabled would be calculated at color module load time,
then never touched again. We can detect serial boots beyond just what we're
told by loader.conf(5) so this works out in many cases, but we must
re-evaluate the situation after the config is loaded to make sure we're not
supposed to be forcing it enabled/disabled.

Discovered while trying to test r353872.
stand/lua/color.lua
stand/lua/screen.lua