Oops - fix a typo in the new zfs list_pools output to preserve the "%" symbols in the outputs. That symbol only needs to get trimmed out during the system health checks - not globally.

This commit is contained in:
Ken Moore
2016-03-22 10:02:35 -04:00
parent b074a611ee
commit 7edfaa2321
2 changed files with 4 additions and 3 deletions

View File

@@ -352,7 +352,8 @@ void EventWatcher::CheckSystemState(){
}
// Check the capacity, if over 90% we should warn
bool ok = false;
int cap = zpools.value(pools[i]).toObject().value("capacity").toInt(ok);
QString capacity = zpools.value(pools[i]).toObject().value("capacity").toString();
int cap = capacity.replace("%","").toInt(&ok);
if(ok && cap>90) {
if(priority < 6){ priority = 6; }
}