From 64b052bbd8b46779269b8a4a1f10e51a67e0ee7e Mon Sep 17 00:00:00 2001 From: Andrija Vucinic Date: Sat, 25 Apr 2015 23:35:33 +0200 Subject: [PATCH] luci-mod-admin-full: mount points SWAP fix SWAP section was showing an error. Fixed it to display the devices/size properly. --- .../luasrc/model/cbi/admin_system/fstab.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.25.1