fort/test/log_read.lua

17 lines
337 B
Lua
Raw Normal View History

2015-01-12 06:42:12 +00:00
-- WIPF Log Reader
local sys = require"sys"
local wipf = require"wipflua"
local device = assert(sys.handle():open(wipf.device_name()))
local BUFSIZ = wipf.buffer_size_max()
local buf = assert(sys.mem.pointer(BUFSIZ))
while true do
assert(device:ioctl(wipf.ioctl_getlog(), nil, buf))
2015-01-12 12:32:11 +00:00
print("size:", buf:seek())
2015-01-12 06:42:12 +00:00
buf:seek(0)
end