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:
parent
581c27c0e6
commit
b055174e9e
|
@ -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") {
|
||||
|
|
Loading…
Reference in New Issue