Don't be lossy re: CPU model number.
This commit is contained in:
parent
606680edc5
commit
14b2ce8b81
|
@ -127,7 +127,7 @@ func Info() ([]InfoStat, error) {
|
||||||
if vals, err = common.DoSysctrl("hw.model"); err != nil {
|
if vals, err = common.DoSysctrl("hw.model"); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
c.ModelName = vals[0]
|
c.ModelName = strings.Join(vals, " ")
|
||||||
|
|
||||||
for _, line := range lines {
|
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 {
|
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…
Reference in New Issue