Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2020 23:26:37 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r361709 - head/stand/lua
Message-ID:  <202006012326.051NQbeF059795@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Jun  1 23:26:37 2020
New Revision: 361709
URL: https://svnweb.freebsd.org/changeset/base/361709

Log:
  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

Modified:
  head/stand/lua/drawer.lua

Modified: head/stand/lua/drawer.lua
==============================================================================
--- head/stand/lua/drawer.lua	Mon Jun  1 21:52:24 2020	(r361708)
+++ head/stand/lua/drawer.lua	Mon Jun  1 23:26:37 2020	(r361709)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006012326.051NQbeF059795>