From: Andrew Ruthven Date: Thu, 6 Dec 2018 21:30:00 +0000 (+1300) Subject: Round to an integer X-Git-Tag: 1.0.0~51 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c323c01a60accc6c7c1c363e1a9236bd4a960813;p=mythtv-status.git Round to an integer --- diff --git a/bin/mythtv-status b/bin/mythtv-status index 47ae766..d206038 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -1107,8 +1107,7 @@ sub calc_disk_space_percentage { return 'unknown'; } - my $percent = sprintf("%.1f", - normalise_disk_space($used) / $total * 100); + my $percent = int((normalise_disk_space($used) / $total * 100) + 0.5); if ($percent >= $c->{'disk_space_warn'}) { $exit_value ||= 1;