mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +01:00
Global (macOS): queries SMBIOS data directly on Intel Mac
This commit is contained in:
@@ -11,10 +11,12 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#elif __sun
|
||||
#include <libdevinfo.h>
|
||||
#include <sys/sunddi.h>
|
||||
#elif __APPLE__
|
||||
#include "common/apple/cf_helpers.h"
|
||||
#include <IOKit/IOKitLib.h>
|
||||
#endif
|
||||
|
||||
typedef struct FFSmbiosBios
|
||||
@@ -90,8 +92,12 @@ const char* ffDetectBios(FFBiosResult* bios)
|
||||
}
|
||||
di_fini(rootNode);
|
||||
#elif __HAIKU__ || __OpenBSD__
|
||||
// Currently SMBIOS detection is supported in legancy BIOS only
|
||||
// Currently SMBIOS detection is supported in legacy BIOS only
|
||||
ffStrbufSetStatic(&bios->type, "BIOS");
|
||||
#elif __APPLE__
|
||||
// Intel Macs use UEFI from day one
|
||||
FF_IOOBJECT_AUTO_RELEASE io_registry_entry_t deviceEfi = IORegistryEntryFromPath(MACH_PORT_NULL, "IODeviceTree:/efi");
|
||||
ffStrbufSetStatic(&bios->type, deviceEfi ? "UEFI" : "BIOS");
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -72,7 +72,7 @@ const char* ffDetectHost(FFHostResult* host)
|
||||
ffCleanUpSmbiosValue(&host->family);
|
||||
}
|
||||
|
||||
#if _WIN64 && __x86_64__ // aarch64 also defines _WIN64
|
||||
#if __x86_64__
|
||||
ffHostDetectMac(host);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user