diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-16 01:36:38 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-09-16 01:36:38 +0000 |
commit | 7dfe9098a5a82085aa5b1e1d2f4caec6169ce872 (patch) | |
tree | 8a86879d3c64ac59b6d599945af35608af057241 /modules/admin-full | |
parent | 922f92cd7df28d8ccc396cd13392b8469c34c88a (diff) |
* luci/admin-full: cope with nil values in fstab overview
Diffstat (limited to 'modules/admin-full')
-rw-r--r-- | modules/admin-full/luasrc/model/cbi/admin_system/fstab.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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 78beed730..35c85c696 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 |