]> hydra-www.ietfng.org Git - acmetensortoys-esp-lua_core/commitdiff
Catch up with upstream LFS changes
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 29 Dec 2021 22:32:44 +0000 (22:32 +0000)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 29 Dec 2021 22:32:44 +0000 (22:32 +0000)
util/diag.lua
util/lfs-strings.lua

index d466014fed0b1af42e629c24bb2716e18889bc24..350bc28aa03cda72dcefee73097dc588a0607326 100644 (file)
@@ -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')
index 764c44c64c90ee042eeb617c7b214ec473e1bb9d..66897aafc9238b02fbbf3bf9afc53b92c7b4fde3 100644 (file)
@@ -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",