Skip to content

Commit bbea3dc

Browse files
committed
Check for CPU number on s390
1 parent 67eafb3 commit bbea3dc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

linux/LinuxMachine.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,10 @@ static void scanCPUFrequencyFromCPUinfo(LinuxMachine* this) {
590590
if (fgets(buffer, PROC_LINE_LENGTH, file) == NULL)
591591
break;
592592

593-
if (sscanf(buffer, "processor : %d", &cpuid) == 1) {
593+
if (
594+
(sscanf(buffer, "processor : %d", &cpuid) == 1) ||
595+
(sscanf(buffer, "cpu number : %d", &cpuid) == 1) // s390: https://github.com/torvalds/linux/blob/v6.15/arch/s390/kernel/processor.c#L349
596+
) {
594597
continue;
595598
} else if (
596599
(sscanf(buffer, "cpu MHz : %lf", &frequency) == 1) ||

0 commit comments

Comments
 (0)