Avoid displaying negative free space
This commit is contained in:
parent
d7c15163e1
commit
0ad1491634
@ -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