From: Jo-Philipp Wich Date: Tue, 16 Sep 2008 01:37:23 +0000 (+0000) Subject: * luci-0.8: backport fstab fix X-Git-Tag: 0.8.0~71 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=bc257d42750c26a54af6252857ef9bea7a5a9101;p=project%2Fluci.git * luci-0.8: backport fstab fix --- diff --git a/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua b/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua index 78beed7306..35c85c6969 100644 --- a/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua +++ b/modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua @@ -40,9 +40,9 @@ mp = v:option(DummyValue, "mountpoint", translate("a_s_fstab_mountpoint")) avail = v:option(DummyValue, "avail", translate("a_s_fstab_avail")) function avail.cfgvalue(self, section) return luci.tools.webadmin.byte_format( - tonumber(mounts[section].available) * 1024 + ( tonumber(mounts[section].available) or 0 ) * 1024 ) .. " / " .. luci.tools.webadmin.byte_format( - tonumber(mounts[section].blocks) * 1024 + ( tonumber(mounts[section].blocks) or 0 ) * 1024 ) end @@ -50,7 +50,7 @@ used = v:option(DummyValue, "used", translate("a_s_fstab_used")) function used.cfgvalue(self, section) return mounts[section].percent .. " (" .. luci.tools.webadmin.byte_format( - tonumber(mounts[section].used) * 1024 + ( tonumber(mounts[section].used) or 0 ) * 1024 ) .. ")" end