1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-12-23 09:28:07 +11:00

Add support to boot from plan9k filesystems

This commit is contained in:
JakobCh 2020-03-23 13:33:27 +01:00
parent d496ba127e
commit 376ccc11a3

View File

@ -0,0 +1,12 @@
local cfgadd = ...
local comp = require("component")
for fs in comp.list("filesystem") do
if comp.invoke(fs, "getLabel") == "Plan9k" and comp.invoke(fs, "exists", "init.lua") then
print("Plan9k discovered on "..fs)
cfgadd(string.format([[
menu.add("Plan9k on %s", function()
return loadmod("loader_openos")("%s")
end)
]], fs:sub(1, 3), fs))
end
end