summaryrefslogtreecommitdiffhomepage
path: root/libs/sys/luasrc/sys.lua
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sys/luasrc/sys.lua')
-rw-r--r--libs/sys/luasrc/sys.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index ad80ae5ba3..9910ed37ce 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -691,13 +691,14 @@ function wifi.channels(iface)
local fd = io.popen(cmd)
if fd then
local ln, c, f
- repeat
- ln = fd:read("*l") or ""
+ while true do
+ ln = fd:read("*l")
+ if not ln then break end
c, f = ln:match("Channel (%d+) : (%d+%.%d+) GHz")
if c and f then
cns[tonumber(c)] = tonumber(f)
end
- until not ( #ln > 0 )
+ end
fd:close()
end