diff --git a/cmd/vinegar/vinegar.go b/cmd/vinegar/vinegar.go index 3d8d2f59..19b3826e 100644 --- a/cmd/vinegar/vinegar.go +++ b/cmd/vinegar/vinegar.go @@ -154,7 +154,7 @@ func Sysinfo(pfx *wine.Prefix) { * Kernel: %s * Wine: %s` - fmt.Printf(info, Version, revision, sysinfo.Distro, sysinfo.CPU, sysinfo.HasAVX, sysinfo.HasSplitLockDetect, sysinfo.Kernel, ver) + fmt.Printf(info, Version, revision, sysinfo.Distro, sysinfo.CPU.Name, sysinfo.CPU.AVX, sysinfo.CPU.SplitLockDetect, sysinfo.Kernel, ver) if sysinfo.InFlatpak { fmt.Println("* Flatpak: [x]") } diff --git a/sysinfo/sysinfo.go b/sysinfo/sysinfo.go index 86879bf0..88c46fbf 100644 --- a/sysinfo/sysinfo.go +++ b/sysinfo/sysinfo.go @@ -8,19 +8,26 @@ import ( "golang.org/x/sys/cpu" ) +type CPUInfo struct { + Name string + AVX bool + SplitLockDetect bool +} + var ( - Kernel string - CPU string - Cards []Card - Distro string - HasAVX = cpu.X86.HasAVX - HasSplitLockDetect bool - InFlatpak bool + Kernel string + CPU CPUInfo + Cards []Card + Distro string + InFlatpak bool ) func init() { Kernel = getKernel() - CPU, HasSplitLockDetect = cpuModel() + + CPU.AVX = cpu.X86.HasAVX + CPU.Name, CPU.SplitLockDetect = cpuModel() + Cards = getCards() Distro = getDistro()