mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
BIOS (OpenBSD): check bios type
This commit is contained in:
@@ -27,6 +27,11 @@ typedef struct _SYSTEM_BOOT_ENVIRONMENT_INFORMATION
|
||||
};
|
||||
};
|
||||
} SYSTEM_BOOT_ENVIRONMENT_INFORMATION;
|
||||
#elif __OpenBSD__
|
||||
#include "common/io/io.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
typedef struct FFSmbiosBios
|
||||
@@ -89,9 +94,12 @@ const char* ffDetectBios(FFBiosResult* bios)
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
#elif __HAIKU__ || __OpenBSD__
|
||||
#elif __HAIKU__
|
||||
// Currently SMBIOS detection is supported in legency BIOS only
|
||||
ffStrbufSetStatic(&bios->type, "BIOS");
|
||||
#elif __OpenBSD__
|
||||
FF_AUTO_CLOSE_FD int fd = open("/dev/efi", O_RDONLY);
|
||||
ffStrbufSetStatic(&bios->type, fd >= 0 ? "UEFI" : "BIOS");
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user