Merge pull request 'Avoid displaying negative free space' (#28) from df/webif:df-freespace-patch into master
Reviewed-on: #28
This commit is contained in:
commit
94849c51e7
@ -9,6 +9,11 @@ lassign [system diskspace 1] size used perc free fperc tsrbuf tsrused
|
||||
set tsrreserve $($tsrbuf - $tsrused)
|
||||
# Adjust values to account for the TSR reserve
|
||||
set free $($free - $tsrreserve)
|
||||
# In case the reserve has been over-committed
|
||||
if {$free < 0} {
|
||||
# avoid displaying negative free, or used > available
|
||||
set free 0
|
||||
}
|
||||
set used $($size - $free)
|
||||
|
||||
set dbs 0
|
||||
|
Loading…
Reference in New Issue
Block a user