From 6f87026b0c16a928b96cce612b2ccd879d1d5f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 4 Jan 2026 15:37:49 +0800 Subject: [PATCH] Host (macOS): uses `IORegistryEntryFromPath` if applicatable --- src/detection/host/host_apple.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/detection/host/host_apple.c b/src/detection/host/host_apple.c index d61fbc028..990f6c671 100644 --- a/src/detection/host/host_apple.c +++ b/src/detection/host/host_apple.c @@ -1,13 +1,12 @@ #include "host.h" #include "common/sysctl.h" #include "util/apple/cf_helpers.h" -#include "util/stringUtils.h" #include const char* getProductNameWithIokit(FFstrbuf* result) { - FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t registryEntry = IOServiceGetMatchingService(MACH_PORT_NULL, IOServiceNameMatching("product")); + FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t registryEntry = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/product"); if (!registryEntry) return "IOServiceGetMatchingService() failed";