Skip to content
Snippets Groups Projects
Commit 4d747c09 authored by ohrensessel's avatar ohrensessel
Browse files

adapt overlay_usage to match the comments from luebeck

parent 42c43ba2
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,4 @@ local fs = require "nixio.fs"
local opkg = require "luci.model.ipkg"
local st = fs.statvfs(opkg.overlay_root())
local blocks = st.blockss or 0
local bfree = st.bfree or 0
local used = ((blocks - bfree) / blocks)
return math.floor(used * 1000 + 0.5) / 1000
return 1 - st.bfree / st.blocks
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment