]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Round to an integer
authorAndrew Ruthven <andrew@etc.gen.nz>
Thu, 6 Dec 2018 21:30:00 +0000 (10:30 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Thu, 6 Dec 2018 21:30:00 +0000 (10:30 +1300)
bin/mythtv-status

index 47ae7664efa2c8dcb8cbcc4307bc76a39fa91262..d2060384e3bb1b0a4262fa082af3c69affe46e01 100755 (executable)
@@ -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;