From f1f0934be921b568d3c67fe248c4bf9a6142666e Mon Sep 17 00:00:00 2001 From: Jordi Sanfeliu Date: Fri, 1 Dec 2017 11:22:11 +0100 Subject: [PATCH] fixed a missalignment of the MB & CPU temperatures values in 'lmsens.pm' --- Changes | 1 + lib/lmsens.pm | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index bf58283..74dc703 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,7 @@ - Fixed the missing declaration of 'allvalues' in 'gensens.pm' which prevented 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'. 3.10.0 - 25-Sep-2017 diff --git a/lib/lmsens.pm b/lib/lmsens.pm index 7e84ce6..a10b705 100644 --- a/lib/lmsens.pm +++ b/lib/lmsens.pm @@ -984,14 +984,14 @@ sub lmsens_cgi { undef(@tmp); undef(@tmpz); undef(@CDEF); - $str = $lmsens->{desc}->{'mb0'} ? sprintf("%5s", substr($lmsens->{desc}->{'mb0'}, 0, 5)) : "MB 0"; + $str = $lmsens->{desc}->{'mb0'} ? sprintf("%5s", substr($lmsens->{desc}->{'mb0'}, 0, 5)) : "MB 0"; push(@tmp, ("LINE2:mb_0#FFA500:$str\\g", "GPRINT:mb_0:LAST:\\:%3.0lf ")); $str = $lmsens->{desc}->{'cpu0'} ? sprintf("%5s", substr($lmsens->{desc}->{'cpu0'}, 0, 5)) : "CPU 0"; push(@tmp, ("LINE2:cpu_0#4444EE:$str\\g", "GPRINT:cpu_0:LAST:\\:%3.0lf ")) unless !$lmsens->{list}->{'cpu0'}; $str = $lmsens->{desc}->{'cpu2'} ? sprintf("%5s", substr($lmsens->{desc}->{'cpu2'}, 0, 5)) : "CPU 2"; push(@tmp, ("LINE2:cpu_2#EE44EE:$str\\g", "GPRINT:cpu_2:LAST:\\:%3.0lf\\g")) unless !$lmsens->{list}->{'cpu2'}; push(@tmp, "COMMENT: \\n"); - $str = $lmsens->{desc}->{'mb1'} ? sprintf("%5s", substr($lmsens->{desc}->{'mb1'}, 0, 5)) : "MB 1"; + $str = $lmsens->{desc}->{'mb1'} ? sprintf("%5s", substr($lmsens->{desc}->{'mb1'}, 0, 5)) : "MB 1"; push(@tmp, ("LINE2:mb_1#44EEEE:$str\\g", "GPRINT:mb_1:LAST:\\:%3.0lf ")) unless !$lmsens->{list}->{'mb1'}; $str = $lmsens->{desc}->{'cpu1'} ? sprintf("%5s", substr($lmsens->{desc}->{'cpu1'}, 0, 5)) : "CPU 1"; push(@tmp, ("LINE2:cpu_1#EEEE44:$str\\g", "GPRINT:cpu_1:LAST:\\:%3.0lf ")) unless !$lmsens->{list}->{'cpu1'};