Serial console menus for lua.

Remove a bunch of special cases for UEFI and serial consoles.  We do
want to do curses and menu things here. This makes us match what we do
in FORTH, with the possible exception of boxes around menus.

Differential Revision:  https://reviews.freebsd.org/D16816
This commit is contained in:
Warner Losh 2018-08-20 16:44:09 +00:00
parent 44d0efb215
commit 116c531459
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338108
2 changed files with 0 additions and 26 deletions

View File

@ -310,14 +310,6 @@ function core.isZFSBoot()
end
function core.isSerialBoot()
local c = loader.getenv("console")
if c ~= nil then
if c:find("comconsole") ~= nil then
return true
end
end
local s = loader.getenv("boot_serial")
if s ~= nil then
return true
@ -336,14 +328,6 @@ end
-- Is the menu skipped in the environment in which we've booted?
function core.isMenuSkipped()
if core.isSerialBoot() then
return true
end
local c = string.lower(loader.getenv("console") or "")
if c:match("^efi[ ;]") ~= nil or c:match("[ ;]efi[ ;]") ~= nil then
return true
end
c = string.lower(loader.getenv("beastie_disable") or "")
return c == "yes"
end

View File

@ -38,17 +38,10 @@ screen.default_x = 0
screen.default_y = 25
function screen.clear()
if core.isSerialBoot() then
return
end
printc(core.KEYSTR_CSI .. "H" .. core.KEYSTR_CSI .. "J")
end
function screen.setcursor(x, y)
if core.isSerialBoot() then
return
end
printc(core.KEYSTR_CSI .. y .. ";" .. x .. "H")
end
@ -71,9 +64,6 @@ function screen.defcolor()
end
function screen.defcursor()
if core.isSerialBoot() then
return
end
screen.setcursor(screen.default_x, screen.default_y)
end