Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144945783
D54760.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
899 B
Referenced Files
None
Subscribers
None
D54760.id.diff
View Options
diff --git a/stand/lua/config.lua b/stand/lua/config.lua
--- a/stand/lua/config.lua
+++ b/stand/lua/config.lua
@@ -513,6 +513,22 @@
end
end
+-- Auto-load modules required for explicit vfs paths
+-- this allows bhyveload to pass just the env var in
+-- and required modules can be autoloaded, allowing
+-- bhyve to boot from a default FreeBSD install.
+local function enableOptionalRootFSModules()
+ local mountfrom = loader.getenv("vfs.root.mountfrom")
+ if mountfrom == nil then
+ return
+ end
+
+ -- Check for p9fs root and enable virtio_p9fs module
+ if mountfrom:match('^p9fs:') then
+ config.enableModule("virtio_p9fs")
+ end
+end
+
-- Module exports
config.verbose = false
@@ -858,6 +874,7 @@
hook.runAll("kernel.loaded")
print(MSG_MODLOADING)
+ enableOptionalRootFSModules()
status = loadModule(modules, not config.verbose)
hook.runAll("modules.loaded")
return status
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 15, 9:13 AM (15 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27723783
Default Alt Text
D54760.id.diff (899 B)
Attached To
Mode
D54760: loader/lua: auto-load p9fs if vfs.root.mountfrom requires it
Attached
Detach File
Event Timeline
Log In to Comment