diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-12 11:09:20 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-12 11:09:57 +0200 |
commit | 2cc6ff7f6b0fbcbcf123de78ac5fe082fc7910cb (patch) | |
tree | 304caf636cc1143f68341781448aa88a036ed4c5 /modules/luci-base/luasrc/tools | |
parent | 82743b3bd4b4603f2c6b85566d07182cb0f1ce52 (diff) |
luci-base: drop unused tools.status.switch_status() call
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/luasrc/tools')
-rw-r--r-- | modules/luci-base/luasrc/tools/status.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/modules/luci-base/luasrc/tools/status.lua b/modules/luci-base/luasrc/tools/status.lua index e4bc4451a2..dc30c064c0 100644 --- a/modules/luci-base/luasrc/tools/status.lua +++ b/modules/luci-base/luasrc/tools/status.lua @@ -248,43 +248,3 @@ function wifi_assoclist() return assoc end - -function switch_status(devs) - local dev - local switches = { } - for dev in devs:gmatch("[^%s,]+") do - local ports = { } - local swc = io.popen("swconfig dev %s show" - % luci.util.shellquote(dev), "r") - - if swc then - local l - repeat - l = swc:read("*l") - if l then - local port, up = l:match("port:(%d+) link:(%w+)") - if port then - local speed = l:match(" speed:(%d+)") - local duplex = l:match(" (%w+)-duplex") - local txflow = l:match(" (txflow)") - local rxflow = l:match(" (rxflow)") - local auto = l:match(" (auto)") - - ports[#ports+1] = { - port = tonumber(port) or 0, - speed = tonumber(speed) or 0, - link = (up == "up"), - duplex = (duplex == "full"), - rxflow = (not not rxflow), - txflow = (not not txflow), - auto = (not not auto) - } - end - end - until not l - swc:close() - end - switches[dev] = ports - end - return switches -end |