Skip to content

Commit

Permalink
redo VM logic names
Browse files Browse the repository at this point in the history
  • Loading branch information
erikng committed Aug 1, 2024
1 parent f5327bf commit 713dac3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Nudge/Utilities/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,8 @@ struct DeviceManager {
getSysctlValue(for: "hw.model") ?? ""
}

func getVirtualMachineStatus() -> Bool {
if getSysctlValue(for: "kern.hv_vmm_present") == "1" {
return true
}
return false
func isVirtualMachine() -> Bool {
getSysctlValue(for: "kern.hv_vmm_present") == "1"
}

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

if getVirtualMachineStatus() && getCPUTypeString() == "Intel" {
if isVirtualMachine() && getCPUTypeString() == "Intel" {
boardID = "VMM-x86_64"
}

Expand Down

0 comments on commit 713dac3

Please sign in to comment.