summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-mini/luasrc/controller/mini
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-05-09 18:21:32 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-05-09 18:21:32 +0000
commitf1e6f9647ac308f9ba0ba4b2dacd7438c20cb5d3 (patch)
tree36e85392587a85f65add2b79ef284941a1018d17 /modules/admin-mini/luasrc/controller/mini
parentaac40a4dfa36c7f8204d39a26bf8d32cdca0f5ab (diff)
modules/admin-mini: merge last commit
Diffstat (limited to 'modules/admin-mini/luasrc/controller/mini')
-rw-r--r--modules/admin-mini/luasrc/controller/mini/system.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/admin-mini/luasrc/controller/mini/system.lua b/modules/admin-mini/luasrc/controller/mini/system.lua
index ad15b076b..bb93a34c4 100644
--- 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