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:
64600a2
)
modules/admin-full: determine storage space from /proc/partitions if there's no ...
author
Jo-Philipp Wich
<redacted>
Sat, 9 May 2009 18:18:22 +0000
(18:18 +0000)
committer
Jo-Philipp Wich
<redacted>
Sat, 9 May 2009 18:18:22 +0000
(18:18 +0000)
modules/admin-full/luasrc/controller/admin/system.lua
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/controller/admin/system.lua
b/modules/admin-full/luasrc/controller/admin/system.lua
index 33e46b74b939e1a3a18b035a9252eba4b892c501..ff000ab7529af0361d67351ceea96de061020af6 100644
(file)
--- a/
modules/admin-full/luasrc/controller/admin/system.lua
+++ b/
modules/admin-full/luasrc/controller/admin/system.lua
@@
-214,6
+214,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