summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-04-27 15:06:42 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-04-27 15:06:42 +0200
commit2243a3f93770371a1e647265ced6e250eeabc56e (patch)
treee9165c490e4759f927443740bf4c82c2e8aa71ca
parentf322842265803a11327bb8763cd66bf08dfb0858 (diff)
parent64b052bbd8b46779269b8a4a1f10e51a67e0ee7e (diff)
Merge pull request #371 from aidvu/fstab-swap
luci-mod-admin-full: mount points SWAP fix
-rw-r--r--modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua
index fd6175835..d4e834daf 100644
--- a/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua
+++ b/modules/luci-mod-admin-full/luasrc/model/cbi/admin_system/fstab.lua
@@ -190,7 +190,12 @@ dev.cfgvalue = function(self, section)
if v then return "Label: %s" % v end
v = Value.cfgvalue(self, section) or "?"
- return size[v] and "%s (%s MB)" % {v, size[v]} or v
+ e = v and devices[v]
+ if v and e and e.size then
+ return "%s (%s MB)" % {v, e.size}
+ else
+ return v
+ end
end
return m