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 47ae766..d206038 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;