luci-0.8: merge r4500 and r4501
This commit is contained in:
parent
832a13f485
commit
a928465fda
2 changed files with 16 additions and 0 deletions
|
@ -214,6 +214,14 @@ function action_upgrade()
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif luci.fs.access("/proc/partitions") then
|
||||||
|
for l in io.lines("/proc/partitions") do
|
||||||
|
local x, y, b, n = l:match('^%s*(%d+)%s+(%d+)%s+([^%s]+)%s+([^%s]+)')
|
||||||
|
if b and n and not n:match('[0-9]') then
|
||||||
|
size = tonumber(b) * 1024
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return size
|
return size
|
||||||
end
|
end
|
||||||
|
|
|
@ -106,6 +106,14 @@ function action_upgrade()
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
elseif luci.fs.access("/proc/partitions") then
|
||||||
|
for l in io.lines("/proc/partitions") do
|
||||||
|
local x, y, b, n = l:match('^%s*(%d+)%s+(%d+)%s+([^%s]+)%s+([^%s]+)')
|
||||||
|
if b and n and not n:match('[0-9]') then
|
||||||
|
size = tonumber(b) * 1024
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return size
|
return size
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue