svn commit: r329428 - head/stand/lua

Kyle Evans kevans at FreeBSD.org
Sat Feb 17 04:22:36 UTC 2018


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


More information about the svn-src-head mailing list