svn commit: r359072 - head/stand/lua
Ryan Moeller
freqlabs at FreeBSD.org
Wed Mar 18 16:21:12 UTC 2020
Author: freqlabs
Date: Wed Mar 18 16:21:11 2020
New Revision: 359072
URL: https://svnweb.freebsd.org/changeset/base/359072
Log:
loader: Add a "kernel.loaded" hook
This hook can be useful, for example to run a local function to choose
different modules to load when a user has picked a different kernel
from the menu.
Reviewed by: kevans
Approved by: mav (mentor)
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D24115
Modified:
head/stand/lua/config.lua
Modified: head/stand/lua/config.lua
==============================================================================
--- head/stand/lua/config.lua Wed Mar 18 15:02:09 2020 (r359071)
+++ head/stand/lua/config.lua Wed Mar 18 16:21:11 2020 (r359072)
@@ -623,7 +623,7 @@ end
function config.loadelf()
local xen_kernel = loader.getenv('xen_kernel')
local kernel = config.kernel_selected or config.kernel_loaded
- local loaded, status
+ local status
if xen_kernel ~= nil then
print(MSG_XENKERNLOADING)
@@ -633,11 +633,10 @@ function config.loadelf()
end
end
print(MSG_KERNLOADING)
- loaded = config.loadKernel(kernel)
-
- if not loaded then
+ if not config.loadKernel(kernel) then
return false
end
+ hook.runAll("kernel.loaded")
print(MSG_MODLOADING)
status = loadModule(modules, not config.verbose)
More information about the svn-src-head
mailing list