Changeset View
Changeset View
Standalone View
Standalone View
stand/lua/core.lua
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | function core.isZFSBoot() | ||||
local c = loader.getenv("currdev") | local c = loader.getenv("currdev") | ||||
if c ~= nil then | if c ~= nil then | ||||
return c:match("^zfs:") ~= nil | return c:match("^zfs:") ~= nil | ||||
end | end | ||||
return false | return false | ||||
end | end | ||||
function core.isFramebufferConsole() | |||||
local c = loader.getenv("console") | |||||
if c ~= nil then | |||||
if c:find("efi") == nil and c:find("vidconsole") == nil then | |||||
return false | |||||
end | |||||
if loader.getenv("screen.depth") ~= nil then | |||||
return true | |||||
end | |||||
end | |||||
return false | |||||
end | |||||
function core.isSerialConsole() | function core.isSerialConsole() | ||||
local c = loader.getenv("console") | local c = loader.getenv("console") | ||||
if c ~= nil then | if c ~= nil then | ||||
if c:find("comconsole") ~= nil then | if c:find("comconsole") ~= nil then | ||||
return true | return true | ||||
end | end | ||||
end | end | ||||
return false | return false | ||||
▲ Show 20 Lines • Show All 97 Lines • Show Last 20 Lines |