Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103334537
D31297.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31297.diff
View Options
diff --git a/stand/lua/cli.lua b/stand/lua/cli.lua
--- a/stand/lua/cli.lua
+++ b/stand/lua/cli.lua
@@ -240,6 +240,21 @@
pager.close()
end
+cli["disable-device"] = function(...)
+ local _, argv = cli.arguments(...)
+ local d, u
+
+ if #argv == 0 then
+ print("usage error: disable-device device")
+ return
+ end
+
+ d, u = string.match(argv[1], "(%w*%a)(%d+)")
+ if d ~= nil then
+ loader.setenv("hint." .. d .. "." .. u .. ".disabled", "1")
+ end
+end
+
-- Used for splitting cli varargs into cmd_name and the rest of argv
function cli.arguments(...)
local argv = {...}
diff --git a/stand/lua/cli.lua.8 b/stand/lua/cli.lua.8
--- a/stand/lua/cli.lua.8
+++ b/stand/lua/cli.lua.8
@@ -26,7 +26,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd December 17, 2020
+.Dd July 24, 2021
.Dt CLI.LUA 8
.Os
.Sh NAME
@@ -91,10 +91,12 @@
.It
.Ic reload-conf
.It
-.Ic enable-module
+.Ic device-disable
.It
.Ic disable-module
.It
+.Ic enable-module
+.It
.Ic toggle-module
.It
.Ic show-module-options
@@ -131,6 +133,10 @@
.Ic show-module-options
command will dump the list of modules that loader has been made aware of and
any applicable options using paged output.
+.Pp
+The
+.Ic device-disable
+command sets the environment variable that disables the device argument.
.Ss Exported Functions
The following functions are exported from
.Nm :
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 5:04 PM (21 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14820016
Default Alt Text
D31297.diff (1 KB)
Attached To
Mode
D31297: lua loader: Add disable-device to disable a device.
Attached
Detach File
Event Timeline
Log In to Comment