small fix for scaling min/max key

This commit is contained in:
Harald Hope 2021-12-16 16:26:08 -08:00
parent ec8ab3c213
commit f36cc33077

6
inxi
View file

@ -11145,7 +11145,8 @@ sub cp_speed_data {
if ($cpu->{'scaling-min-freq'} || $cpu->{'scaling-max-freq'}){
($info{'scaling-min-max'},$info{'scaling-min-max-key'}) = cp_speed_min_max(
$cpu->{'scaling-min-freq'},
$cpu->{'scaling-max-freq'});
$cpu->{'scaling-max-freq'},
'sc');
}
if ($cpu->{'cur-freq'}){
if ($show{'short'}){
@ -11162,7 +11163,7 @@ sub cp_speed_data {
return \%info;
}
sub cp_speed_min_max {
my ($min,$max) = @_;
my ($min,$max,$type) = @_;
my ($min_max,$key);
if ($min && $max){
$min_max = "$min/$max";
@ -11176,6 +11177,7 @@ sub cp_speed_min_max {
$min_max = $min;
$key = "min";
}
$key = $type . '-' . $key if $type && $key;
return ($min_max,$key);
}
# update $tests by reference