commit f8153 introduced a regression bug. The bootenv functions are not
registered anymore and they cannot be called from scripts. They were
handled separately, but after switching to a Lua Session State, there is
no need for this and the function can be added together with the rest of
the interface.
Signed-off-by: Stefano Babic <
stefan...@swupdate.org>
---
corelib/lua_interface.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c
index 74590ab6..86c2112d 100644
--- a/corelib/lua_interface.c
+++ b/corelib/lua_interface.c
@@ -1195,10 +1195,6 @@ static const luaL_Reg l_swupdate[] = {
{ "getversion", lua_get_swupdate_version },
{ "progress", lua_notify_progress },
{ "emmcbootpart", l_get_emmc_bootpart },
- { NULL, NULL }
-};
-
-static const luaL_Reg l_swupdate_bootenv[] = {
{ "get_bootenv", l_get_bootenv },
{ "set_bootenv", l_set_bootenv },
{ "get_selection", l_get_selection },
@@ -1319,7 +1315,6 @@ static int l_handler_wrapper(struct img_type *img, void *data,
}
struct dict **udbootenv = lua_newuserdata(L, sizeof(struct dict*));
*udbootenv = img->bootloader;
- luaL_setfuncs(L, l_swupdate_bootenv, 1);
lua_pop(L, 1);
}
@@ -1549,7 +1544,6 @@ lua_State *lua_session_init(struct dict *bootenv)
luaL_requiref(L, "swupdate", luaopen_swupdate, 1 );
struct dict **udbootenv = lua_newuserdata(L, sizeof(struct dict*));
*udbootenv = bootenv;
- luaL_setfuncs(L, l_swupdate_bootenv, 1);
lua_pop(L, 1); /* remove unused copy left on stack */
lua_handlers_init(L);
--
2.34.1