Don't be lossy re: CPU model number.

pull/219/head
Sean Chittenden 9 years ago
parent 606680edc5
commit 14b2ce8b81
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16

@ -127,7 +127,7 @@ func Info() ([]InfoStat, error) {
if vals, err = common.DoSysctrl("hw.model"); err != nil {
return nil, err
}
c.ModelName = vals[0]
c.ModelName = strings.Join(vals, " ")
for _, line := range lines {
if matches := regexp.MustCompile(`Origin\s*=\s*"(.+)"\s+Id\s*=\s*(.+)\s+Family\s*=\s*(.+)\s+Model\s*=\s*(.+)\s+Stepping\s*=\s*(.+)`).FindStringSubmatch(line); matches != nil {

Loading…
Cancel
Save