Don't be lossy re: CPU model number.

This commit is contained in:
Sean Chittenden 2016-06-16 19:32:49 -07:00
parent 606680edc5
commit 14b2ce8b81
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
1 changed files with 1 additions and 1 deletions

View File

@ -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 {