1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-12-25 02:18:06 +11:00
Zorya-NEO/utils/installer/menus/osdi.lua

21 lines
592 B
Lua
Raw Normal View History

2020-06-06 10:45:08 +10:00
function menu.bios_osdi()
-- Find OSDI formatted disks.
local osdi = menu.create()
local drives = {}
local dselv = {}
for d in list("drive") do
local drive = proxy(d)
local t = drive.readSector(1)
local fmt = (t:sub(1, 4) == "OSDI")
drives[#drives+1] = {dev=drive, addr=d, format=fmt}
dselv[#dselv+1] = {text=string.format("%s (%s)", d:sub(1,6), lang.getstring((fmt and "osdi_formatted") or "osdi_unformatted")), value=drives[#drives]}
end
local disksel = menu.select(dselv)
disksel:select(function(v)
if not v.format then
end)
osdi:add(disksel)
osdi:destroy()
end