mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
Kernel+Ports: Move SMBIOS sysfs paths to /sys/firmware/smbios
Also use more fitting file names for the entry point and structure table. Now that we expose SMBIOS data on non-x86, putting this in a "bios" directory feels wrong.
This commit is contained in:
1 parent
f1cc3a7549
commit
99f5ffd2cc
5 files changed
+31
-27
No files matched your search
@@ -43,9 +43,9 @@ StringView SysFSPCBIOSComponent::name() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case Type::SMBIOSEntryPoint:
|
||||
return "smbios_entry_point"sv;
|
||||
return "entry_point"sv;
|
||||
case Type::SMBIOSTable:
|
||||
return "DMI"sv;
|
||||
return "structure_table"sv;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Kernel {
|
||||
|
||||
class SysFSBIOSDirectory : public SysFSDirectory {
|
||||
public:
|
||||
virtual StringView name() const override { return "bios"sv; }
|
||||
virtual StringView name() const override { return "smbios"sv; }
|
||||
static NonnullRefPtr<SysFSBIOSDirectory> must_create(SysFSFirmwareDirectory&);
|
||||
|
||||
void create_components();
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <[email protected]>
|
||||
Date: Fri, 1 Apr 2022 11:01:13 +0300
|
||||
Subject: [PATCH] Use serenity's firmware binary path
|
||||
|
||||
---
|
||||
dmidecode.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dmidecode.c b/dmidecode.c
|
||||
index cd2b5c9..49bf30e 100644
|
||||
--- a/dmidecode.c
|
||||
+++ b/dmidecode.c
|
||||
@@ -90,7 +90,7 @@ static const char *bad_index = "<BAD INDEX>";
|
||||
#define FLAG_NO_FILE_OFFSET (1 << 0)
|
||||
#define FLAG_STOP_AT_EOT (1 << 1)
|
||||
|
||||
-#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables"
|
||||
+#define SYS_FIRMWARE_DIR "/sys/firmware/bios"
|
||||
#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
|
||||
#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Liav A <[email protected]>
|
||||
Date: Fri, 1 Apr 2022 11:01:13 +0300
|
||||
Subject: [PATCH] Use serenity's firmware binary paths
|
||||
|
||||
---
|
||||
dmidecode.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dmidecode.c b/dmidecode.c
|
||||
index 463f12b2748c7e37f0e4345d26e6e804b21b0a28..af3a72c7d579ec21c8c0e9541bd984dd6850ed33 100644
|
||||
--- a/dmidecode.c
|
||||
+++ b/dmidecode.c
|
||||
@@ -94,9 +94,9 @@ enum cpuid_type cpuid_type = cpuid_none;
|
||||
#define FLAG_NO_FILE_OFFSET (1 << 0)
|
||||
#define FLAG_STOP_AT_EOT (1 << 1)
|
||||
|
||||
-#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables"
|
||||
-#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
|
||||
-#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"
|
||||
+#define SYS_FIRMWARE_DIR "/sys/firmware/smbios"
|
||||
+#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/entry_point"
|
||||
+#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/structure_table"
|
||||
|
||||
/*
|
||||
* Type-independant Stuff
|
||||
@@ -1,7 +1,7 @@
|
||||
# Patches for dmidecode on SerenityOS
|
||||
|
||||
## `0001-Use-serenity-s-firmware-binary-path.patch`
|
||||
## `0001-Use-serenity-s-firmware-binary-paths.patch`
|
||||
|
||||
Use serenity's firmware binary path
|
||||
Use serenity's firmware binary paths
|
||||
|
||||
|
||||
Reference in new issue
Block a user