git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
aac40a4
)
modules/admin-mini: merge last commit
author
Jo-Philipp Wich
<redacted>
Sat, 9 May 2009 18:21:32 +0000
(18:21 +0000)
committer
Jo-Philipp Wich
<redacted>
Sat, 9 May 2009 18:21:32 +0000
(18:21 +0000)
modules/admin-mini/luasrc/controller/mini/system.lua
patch
|
blob
|
history
diff --git
a/modules/admin-mini/luasrc/controller/mini/system.lua
b/modules/admin-mini/luasrc/controller/mini/system.lua
index ad15b076b0639fd9e3fb5c933411c477610d2fbd..bb93a34c472daa3753cb92982616bd91fb7ff1e8 100644
(file)
--- a/
modules/admin-mini/luasrc/controller/mini/system.lua
+++ b/
modules/admin-mini/luasrc/controller/mini/system.lua
@@
-106,6
+106,14
@@
function action_upgrade()
break
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
return size
end
git clone https://git.99rst.org/PROJECT