hostman: use "uname -m" for for fetch processor type

"uname -p" command from native busybox, coreutils may return "unknown".
CentOS coreutils has a patch fallback to using uts.machine if sysinfo
syscall is not available

Use "uname -m" for maximum compatibility
This commit is contained in:
Yousong Zhou
2020-02-28 11:43:12 +08:00
parent 3861bb6bc1
commit 01de80ed09
+1 -1
View File
@@ -95,7 +95,7 @@ func DetectCpuInfo() (*SCPUInfo, error) {
if err != nil {
return nil, errors.Wrap(err, "parse dmi cpuinfo")
}
cpuArch, err := procutils.NewCommand("uname", "-p").Output()
cpuArch, err := procutils.NewCommand("uname", "-m").Output()
if err != nil {
return nil, errors.Wrap(err, "get cpu architecture")
}