From e351683a88c510c4ccc65d3f66453b776141dab8 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 1 Aug 2019 22:40:37 +1000 Subject: [PATCH] made dispmanager not crash when presented with no data dir --- module/dispmanager.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/dispmanager.lua b/module/dispmanager.lua index 3ef5f05..76b53d3 100644 --- a/module/dispmanager.lua +++ b/module/dispmanager.lua @@ -18,7 +18,7 @@ local function findNextDisplay() -- finds the next available screen, or nil if t return nil end -for file in ipairs(fs.list("/boot/cfg/disp/")) do -- allows files in /boot/cfg/disp with filenames as GPU addresses to bind to specific screens +for file in ipairs(fs.list("/boot/cfg/disp/") or {}) do -- allows files in /boot/cfg/disp with filenames as GPU addresses to bind to specific screens if component.proxy(file) then local f = io.open("/boot/cfg/disp/"..file) if f then @@ -36,7 +36,6 @@ for a,_ in component.list("gpu") do -- allocate a screen to every unused GPU end for gpu,screen in pairs(tG) do - dprint(gpu,screen) local r,w = vtemu(gpu,screen) iofs.register("tty"..tostring(ttyn),function() return r,w,function() w("\27[2J\27[H") end end) local f = io.open("/iofs/tty"..tostring(ttyn),"rw")