aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2021-02-14 08:28:29 +0000
committerToomas Soome <tsoome@FreeBSD.org>2021-02-23 07:39:18 +0000
commitb3e822993503a9f18575c71020cb98056e022164 (patch)
tree51a5ebf2a068e5b2ea6455e946b1d743c52c18aa
parent035021b98a251247ba62ffbb6b6411766b3dd321 (diff)
downloadsrc-b3e822993503a9f18575c71020cb98056e022164.tar.gz
src-b3e822993503a9f18575c71020cb98056e022164.zip
loader_lua: consider userboot console as serial
We use ascii box chars with serial console because we do not know if terminal can draw unixode box chars. Same problem is about userboot console. (cherry picked from commit 5d8c062fe3ee7b2d6aed0b46d22f62c7771c0af8) Approved by: re (gjb)
-rw-r--r--stand/lua/core.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/stand/lua/core.lua b/stand/lua/core.lua
index a119c3c258f8..55c26e0d6d39 100644
--- a/stand/lua/core.lua
+++ b/stand/lua/core.lua
@@ -403,7 +403,10 @@ end
function core.isSerialConsole()
local c = loader.getenv("console")
if c ~= nil then
- if c:find("comconsole") ~= nil then
+ -- serial console is comconsole, but also userboot.
+ -- userboot is there, because we have no way to know
+ -- if the user terminal can draw unicode box chars or not.
+ if c:find("comconsole") ~= nil or c:find("userboot") ~= nil then
return true
end
end