From 7b213d87cf9838dc4f13c5f8ae9f07eb3a95166c Mon Sep 17 00:00:00 2001 From: Jed Reynolds Date: Fri, 8 Jul 2022 11:51:41 -0700 Subject: [PATCH] sensorz.pl: adds support for APU2 cpu and hexidecimal PCI numbers Signed-off-by: Jed Reynolds --- sensorz.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sensorz.pl b/sensorz.pl index 5978c6f6..3c947c7a 100755 --- a/sensorz.pl +++ b/sensorz.pl @@ -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);