cpu: Add the matching rule "Model Name" when parsing cpuinfo

This is to fix the error of running TestCpuInfo on Linux/long64. In loong64
/proc/cpuinfo, the model name is capitalize the first letter

Reference:
  https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/proc.c

Signed-off-by: Guoqi Chen <chenguoqi@loongson.cn>
This commit is contained in:
Guoqi Chen 2023-01-13 13:07:06 +08:00
parent 581c27c0e6
commit b055174e9e
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ func InfoWithContext(ctx context.Context) ([]InfoStat, error) {
}
}
}
case "model name", "cpu":
case "Model Name", "model name", "cpu":
c.ModelName = value
if strings.Contains(value, "POWER8") ||
strings.Contains(value, "POWER7") {