sensorz.pl: adds support for APU2 cpu and hexidecimal PCI numbers

Signed-off-by: Jed Reynolds <jreynolds@candelatech.com>
This commit is contained in:
Jed Reynolds
2022-07-08 11:51:41 -07:00
committed by shivam
parent 6db9d7eb48
commit 7b213d87cf

View File

@@ -14,8 +14,11 @@ for my $line (@sensor_lines) {
next if ($line =~ /^\s*$/);
chomp $line;
if ($line =~ /^[^: ]+$/) {
($::device) = $line =~ /^(.*?-\d+)$/;
next if ($line !~ /^(mt7915_|ath10k_hwmon-pci|physical|coretemp|Core )/);
($::device) = $line =~ /^(.*?-[\da-f]+)$/;
if (!(defined $::device)) {
print STDOUT "not a device? [$line]\n";
}
next if ($line !~ /^(k10temp-pci|mt7915_|ath10k_hwmon-pci|physical|coretemp|Core )/);
if ( !defined $::sensor_readings{$::device}) {
$::sensor_readings{$::device} = 0;
push(@::sensor_devices, $::device);