Skip to content

Commit 713dac3

Browse files
committed
redo VM logic names
1 parent f5327bf commit 713dac3

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Nudge/Utilities/Utils.swift

+3-6
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,8 @@ struct DeviceManager {
711711
getSysctlValue(for: "hw.model") ?? ""
712712
}
713713

714-
func getVirtualMachineStatus() -> Bool {
715-
if getSysctlValue(for: "kern.hv_vmm_present") == "1" {
716-
return true
717-
}
718-
return false
714+
func isVirtualMachine() -> Bool {
715+
getSysctlValue(for: "kern.hv_vmm_present") == "1"
719716
}
720717

721718
func getHardwareModelIDs() -> [String] {
@@ -724,7 +721,7 @@ struct DeviceManager {
724721
let hardwareModelID = getIORegInfo(serviceTarget: "target-sub-type") ?? "Unknown"
725722
let gestaltModelStringID = getKeyResultFromGestalt("HWModelStr")
726723

727-
if getVirtualMachineStatus() && getCPUTypeString() == "Intel" {
724+
if isVirtualMachine() && getCPUTypeString() == "Intel" {
728725
boardID = "VMM-x86_64"
729726
}
730727

0 commit comments

Comments
 (0)