From 16cd3b0d397f3f216f1d7a6d7be7533d5c631c09 Mon Sep 17 00:00:00 2001 From: Nathaniel Wesley Filardo Date: Wed, 29 Dec 2021 22:32:44 +0000 Subject: [PATCH] Catch up with upstream LFS changes --- util/diag.lua | 16 +++++++--------- util/lfs-strings.lua | 24 +++++++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/util/diag.lua b/util/diag.lua index d466014..350bc28 100644 --- a/util/diag.lua +++ b/util/diag.lua @@ -30,16 +30,14 @@ if file then print('FS', ("rem=%d used=%d sz=%d"):format(file.fsinfo())) for k,v in pairs(file.list()) do print("",k,v) end end -if node and node.flashindex then - local ut, fa, ma, sz, t = node.flashindex() - if fa and ma then - print('LFSM',("flashaddr=0x%x mapaddr=0x%x"):format(fa, ma)) +if node then + local i = node.info('lfs') + if ba then + print('LFS',("baseaddr=0x%x sz=0x%x used=0x%x mapaddr=0x%x"): + format(i.lfs_base, i.lfs_size, i.lfs_used, i.lfs_mapped)) + for k,v in ipairs(t) do print("", v) end else - print('LFSM',"No data") - end - if ut then - print('LFS', ("unixtime=%d sz=%d"):format(ut, sz)) - for k,v in ipairs(t) do print("", v) end + print('LFS',"Not installed") end end print('PACKAGES') diff --git a/util/lfs-strings.lua b/util/lfs-strings.lua index 764c44c..66897aa 100644 --- a/util/lfs-strings.lua +++ b/util/lfs-strings.lua @@ -1,13 +1,19 @@ --- from lua_examples/lfs/dummy_strings.lua -local preload = "?.lc;?.lua", "/\n;\n?\n!\n-", "@init.lua", "_G", "_LOADED", -"_LOADLIB", "__add", "__call", "__concat", "__div", "__eq", "__gc", "__index", -"__le", "__len", "__lt", "__mod", "__mode", "__mul", "__newindex", "__pow", -"__sub", "__tostring", "__unm", "collectgarbage", "cpath", "debug", "file", -"file.obj", "file.vol", "flash", "getstrings", "index", "ipairs", "list", "loaded", +local preload = "?.lc;?.lua", "/\n;\n?\n!\n-\n", "@init.lua", +"=stdin", "stdin", "stdout", "Lua 5.1", "Lua 5.3", "LUABOX", +"(for index)", "(for limit)", "(for step)", "__pairs", +-- +"searchers", "searchpath", +"_G", "_LOADED", "_LOADLIB", "_PRELOAD", "_VERSION", "_PROMPT", +"__add", "__call", "__concat", "__div", "__eq", "__gc", "__index", "__le", +"__len", "__lt", "__mod", "__mode", "__mul", "__name", "__newindex", "__pow", +"__sub", "__tostring", "__unm", +-- +"collectgarbage", "cpath", "debug", "file", "file.obj", +"file.vol", "flash", "getstrings", "index", "ipairs", "list", "loaded", "loader", "loaders", "loadlib", "module", "net.tcpserver", "net.tcpsocket", -"net.udpsocket", "newproxy", "package", "pairs", "path", "preload", "reload", -"require", "seeall", "wdclr", "not enough memory", "sjson.decoder","sjson.encoder", -"tmr.timer" +"net.udpsocket", "newproxy", "onerror", "package", "pairs", "path", "preload", +"reload", "require", "seeall", "sntppkt.resp", "wdclr", "not enough memory", +"sjson.decoder","sjson.encoder", "tmr.timer" local initload = ".lc", ".lua", "loadfile", -- 2.50.1