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')
--- 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",