[freebsd] cpu: fix CPUInfo on 10.3R

Related: #307
pull/375/head
WAKAYAMA shirou 8 years ago
parent 37c114fe6c
commit b6da2bd76e

@ -146,7 +146,7 @@ func Info() ([]InfoStat, error) {
func parseDmesgBoot(fileName string) (InfoStat, int, error) { func parseDmesgBoot(fileName string) (InfoStat, int, error) {
c := InfoStat{} c := InfoStat{}
lines, _ := common.ReadLines(fileName) lines, _ := common.ReadLines(fileName)
var cpuNum int cpuNum := 1 // default cpu num is 1
for _, line := range lines { for _, line := range lines {
if matches := cpuEnd.FindStringSubmatch(line); matches != nil { if matches := cpuEnd.FindStringSubmatch(line); matches != nil {
break break

Loading…
Cancel
Save