Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Feb 2018 04:22:36 +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: r329428 - head/stand/lua
Message-ID:  <201802170422.w1H4MaR8053066@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Feb 17 04:22:36 2018
New Revision: 329428
URL: https://svnweb.freebsd.org/changeset/base/329428

Log:
  stand/lua: Correct some trivial errors in config
  
  An empty module_path to start with isn't ideal, but if all modules are
  contained within a kernel directory (which is what we just tested) then it
  isn't strictly an error. Don't assume that module_path has a value already.
  
  When we fail to load the kernel, printing the result (which is guaranteed to
  be nil) is not intended; print the name of the kernel.

Modified:
  head/stand/lua/config.lua

Modified: head/stand/lua/config.lua
==============================================================================
--- head/stand/lua/config.lua	Sat Feb 17 04:07:16 2018	(r329427)
+++ head/stand/lua/config.lua	Sat Feb 17 04:22:36 2018	(r329428)
@@ -297,7 +297,10 @@ function config.loadkernel()
 
 			-- succeeded add path to module_path
 			if res ~= nil then
-				loader.setenv("module_path", v..";"..module_path);
+				if module_path == nil then
+					loader.setenv("module_path", v..";"..
+					    module_path);
+				end
 				return true;
 			end
 		end
@@ -308,7 +311,7 @@ function config.loadkernel()
 		if res ~= nil then
 			return true;
 		else
-			print("Failed to load kernel '"..res.."'");
+			print("Failed to load kernel '"..kernel.."'");
 			return false;
 		end
 	end



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