Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue restart rather than second lua_main() call on LFS reload. #3668

Open
wants to merge 1 commit into
base: dev-esp32
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/base_nodemcu/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static void start_lua ()
{
NODE_DBG("Task task_lua started.\n");
if (lua_main()) // If it returns true then LFS restart is needed
lua_main();
esp_restart();
}

static void nodemcu_init(void)
Expand Down
5 changes: 2 additions & 3 deletions components/lua/lua-5.3/lnodemcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,9 @@ LUAI_FUNC int luaN_init (lua_State *L) {
lua_getglobal(L, #t); luaL_getmetafield( L, 1, #f ); lua_remove(L, -2);

LUALIB_API void luaL_lfsreload (lua_State *L) {
#if defined(CONFIG_NODEMCU_EMBEDDED_FLS_SIZE)
(void)L;
#if defined(CONFIG_NODEMCU_EMBEDDED_LFS_SIZE)
lua_pushstring(L, "Not allowed to write to LFS section");
return 1;
return;
#else
#ifdef LUA_USE_ESP
size_t l;
Expand Down