Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102855737
D44094.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
D44094.diff
View Options
diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c
--- a/stand/liblua/lutils.c
+++ b/stand/liblua/lutils.c
@@ -109,6 +109,13 @@
return 1;
}
+static int
+lua_exit(lua_State *L)
+{
+ exit(luaL_checkinteger(L, 1));
+ return 0;
+}
+
static int
lua_command_error(lua_State *L)
{
@@ -380,14 +387,15 @@
#define REG_SIMPLE(n) { #n, lua_ ## n }
static const struct luaL_Reg loaderlib[] = {
- REG_SIMPLE(delay),
- REG_SIMPLE(command_error),
REG_SIMPLE(command),
- REG_SIMPLE(interpret),
- REG_SIMPLE(parse),
+ REG_SIMPLE(command_error),
+ REG_SIMPLE(delay),
+ REG_SIMPLE(exit),
REG_SIMPLE(getenv),
REG_SIMPLE(has_command),
REG_SIMPLE(has_feature),
+ REG_SIMPLE(interpret),
+ REG_SIMPLE(parse),
REG_SIMPLE(perform),
REG_SIMPLE(printc), /* Also registered as the global 'printc' */
REG_SIMPLE(setenv),
diff --git a/stand/lua/loader.lua.8 b/stand/lua/loader.lua.8
--- a/stand/lua/loader.lua.8
+++ b/stand/lua/loader.lua.8
@@ -61,6 +61,10 @@
Like
.Fn perform
but the arguments are already parsed onto the stack.
+.It Fn exit status
+Exit the boot loader back to the firmware with a status of
+.Va status .
+The interpretation of this value is firmware specific.
.It Fn interpret str
Execute the loader builtin command
.Va str
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 19, 1:22 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14708052
Default Alt Text
D44094.diff (1 KB)
Attached To
Mode
D44094: loader: Add loader.exit
Attached
Detach File
Event Timeline
Log In to Comment