forked from osmarks/potatOS
remove unused YAFSS code
This commit is contained in:
parent
6f082b20e3
commit
adf7567b86
@ -405,16 +405,6 @@ Allowing `setfenv` to operate on any function meant that privileged code could i
|
|||||||
environment._ENV = environment
|
environment._ENV = environment
|
||||||
environment._HOST = string.format("YAFSS on %s", _HOST)
|
environment._HOST = string.format("YAFSS on %s", _HOST)
|
||||||
|
|
||||||
local upper = _G.hypercalls
|
|
||||||
environment.hypercalls = {}
|
|
||||||
function environment.hypercalls.upper()
|
|
||||||
return upper
|
|
||||||
end
|
|
||||||
function environment.hypercalls.layers()
|
|
||||||
if upper then return upper.layers() + 1
|
|
||||||
else return 1 end
|
|
||||||
end
|
|
||||||
|
|
||||||
function environment.os.shutdown()
|
function environment.os.shutdown()
|
||||||
os.queueEvent("power_state", "shutdown")
|
os.queueEvent("power_state", "shutdown")
|
||||||
while true do coroutine.yield() end
|
while true do coroutine.yield() end
|
||||||
@ -441,7 +431,6 @@ local function run(root_directory, overlay, API_overrides, init)
|
|||||||
env.init_code = init
|
env.init_code = init
|
||||||
|
|
||||||
local out, err = load(init, "@[init]", "t", env)
|
local out, err = load(init, "@[init]", "t", env)
|
||||||
env.hypercalls.run = out
|
|
||||||
if not out then error(err) end
|
if not out then error(err) end
|
||||||
local ok, err = pcall(out)
|
local ok, err = pcall(out)
|
||||||
if not ok then printError(err) end
|
if not ok then printError(err) end
|
||||||
|
Loading…
Reference in New Issue
Block a user