lualoader: improve drawer error handling
At least one user has landed in a scenario where logo files appear to be misnamed, and we failed to find them. Our fallback for missing logodefs is orb/orbbw, based on the color status. In a scenario where we can't locate the logos, though, this is not ideal. Add in one more layer of fallback to properly just don't draw any logo if the fan has been jam packed with foreign material. PR: 246046 MFC after: 3 days
This commit is contained in:
parent
41e66f4eca
commit
6697f577d1
@ -258,6 +258,11 @@ local function drawlogo()
|
||||
else
|
||||
logodef = getLogodef(drawer.default_bw_logodef)
|
||||
end
|
||||
|
||||
-- Something has gone terribly wrong.
|
||||
if logodef == nil then
|
||||
logodef = getLogodef(drawer.default_fallback_logodef)
|
||||
end
|
||||
end
|
||||
|
||||
if logodef ~= nil and logodef.graphic == none then
|
||||
@ -355,6 +360,9 @@ shift = default_shift
|
||||
drawer.default_brand = 'fbsd'
|
||||
drawer.default_color_logodef = 'orb'
|
||||
drawer.default_bw_logodef = 'orbbw'
|
||||
-- For when things go terribly wrong; this def should be present here in the
|
||||
-- drawer module in case it's a filesystem issue.
|
||||
drawer.default_fallback_logodef = 'none'
|
||||
|
||||
function drawer.addBrand(name, def)
|
||||
branddefs[name] = def
|
||||
|
Loading…
Reference in New Issue
Block a user