diff --git a/Changes b/Changes index 74dc703..961a4eb 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,7 @@ graphs generation if 'show_gaps' option was enabled. - Fixed to correctly represent the values in text mode in 'ipmi.pm'. - Fixed a missalignment of the MB & CPU temperatures values in 'lmsens.pm'. +- Fixed to limit the length of the device names in 'fs.pm'. 3.10.0 - 25-Sep-2017 diff --git a/lib/fs.pm b/lib/fs.pm index ec2cc31..4be9078 100644 --- a/lib/fs.pm +++ b/lib/fs.pm @@ -980,7 +980,7 @@ sub fs_cgi { $color = $LC[$n2++]; } push(@tmpz, "LINE2:fs" . $n . $color . ":$str"); - $str = sprintf("%-23s", $str); + $str = sprintf("%-23s", substr($str, 0, 23)); push(@tmp, "LINE2:fs" . $n . $color . ":$str"); push(@tmp, "GPRINT:fs" . $n . ":LAST:Cur\\: %4.1lf%%"); push(@tmp, "GPRINT:fs" . $n . ":MIN: Min\\: %4.1lf%%"); @@ -1097,7 +1097,7 @@ sub fs_cgi { $color = $LC[$n2++]; } push(@tmpz, "LINE2:ioa" . $n . $color . ":$str"); - $str = sprintf("%-23s", $str); + $str = sprintf("%-23s", substr($str, 0, 23)); push(@tmp, "LINE2:ioa" . $n . $color . ":$str"); push(@tmp, "GPRINT:ioa" . $n . ":LAST:Cur\\: %4.0lf"); push(@tmp, "GPRINT:ioa" . $n . ":MIN: Min\\: %4.0lf"); @@ -1209,7 +1209,7 @@ sub fs_cgi { $color = $LC[$n2++]; } push(@tmpz, "LINE2:fs" . $n . $color . ":$str"); - $str = sprintf("%-23s", $str); + $str = sprintf("%-23s", substr($str, 0, 23)); push(@tmp, "LINE2:fs" . $n . $color . ":$str"); push(@tmp, "GPRINT:fs" . $n . ":LAST:Cur\\: %4.1lf%%"); push(@tmp, "GPRINT:fs" . $n . ":MIN: Min\\: %4.1lf%%"); @@ -1334,7 +1334,7 @@ sub fs_cgi { $color = $LC[$n2++]; } push(@tmpz, "LINE2:tim" . $n . $color . ":$str"); - $str = sprintf("%-23s", $str); + $str = sprintf("%-23s", substr($str, 0, 23)); push(@tmp, "LINE2:tim" . $n . $color . ":$str"); push(@tmp, "GPRINT:stim" . $n . ":LAST:Cur\\: %4.1lfs"); push(@tmp, "GPRINT:stim" . $n . ":MIN:Min\\: %4.1lfs"); @@ -1360,7 +1360,7 @@ sub fs_cgi { $color = $LC[$n2++]; } push(@tmpz, "LINE2:tim" . $n . $color . ":$str"); - $str = sprintf("%-23s", $str); + $str = sprintf("%-23s", substr($str, 0, 23)); push(@tmp, "LINE2:tim" . $n . $color . ":$str"); push(@tmp, "GPRINT:tim" . $n . ":LAST:Cur\\: %4.0lf"); push(@tmp, "GPRINT:tim" . $n . ":MIN: Min\\: %4.0lf");