Permalink
Browse files

debloat: syntax on ethtool changed breaking debloat script

Slightly more robust error checking put in for debloat to
work aright again in cero... but I do wish there was a sys
or proc interface to all this stuff or some other stable
output format for ethtool.
  • Loading branch information...
Dave Taht
Dave Taht committed Jun 17, 2012
1 parent 3310c03 commit a02585011e5e3abccc2f672431d3ec9820c59634
Showing with 5 additions and 1 deletion.
  1. +5 −1 net/debloat/files/debloat
@@ -686,14 +686,18 @@ function offloads(iface)
return nil
end
end
-
+
for i,v in ipairs(s) do
local h = v:split(":")
local j = h[1]:split(" ")
+ if # j > 1 then
if j[1] ~= "Offload" then
+ if # h > 1 then
t[h[1]:trim()] = h[2]:trim()
+ end
-- FIXME: should probably change 'off' and 'on' to false and true
end
+ end
end
end
return t

0 comments on commit a025850

Please sign in to comment.