mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-05 20:54:21 +01:00
Host (macOS): uses IORegistryEntryFromPath if applicatable
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
#include "host.h"
|
||||
#include "common/sysctl.h"
|
||||
#include "util/apple/cf_helpers.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <IOKit/IOKitLib.h>
|
||||
|
||||
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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user