summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Plugins/Monitors/Disk.hs3
-rw-r--r--src/StatFS.hsc2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Plugins/Monitors/Disk.hs b/src/Plugins/Monitors/Disk.hs
index 461663d..dca268d 100644
--- a/src/Plugins/Monitors/Disk.hs
+++ b/src/Plugins/Monitors/Disk.hs
@@ -83,8 +83,7 @@ fsStats path = do
Nothing -> return [-1, -1, -1]
Just f -> let tot = fsStatByteCount f
free = fsStatBytesAvailable f
- used = fsStatBytesUsed f
- in return [tot, free, used]
+ in return [tot, free, (tot - free)]
speedToStr :: Float -> String
speedToStr = showWithUnits 2 1
diff --git a/src/StatFS.hsc b/src/StatFS.hsc
index d9d34ea..d007d08 100644
--- a/src/StatFS.hsc
+++ b/src/StatFS.hsc
@@ -79,5 +79,5 @@ getFileSystemStats path =
, fsStatByteCount = toI bcount * bpb
, fsStatBytesFree = toI bfree * bpb
, fsStatBytesAvailable = toI bavail * bpb
- , fsStatBytesUsed = toI (bcount - bfree) * bpb
+ , fsStatBytesUsed = toI (bcount - bavail) * bpb
}