1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 20:35:07 +00:00
serenity/Ports/dmidecode/patches/dmidecode.patch
Liav A 0259781402 Ports: Fix dmidecode patches
Since we have a SysFS now, we can just let dmidecode to read the DMI
blobs from it.
2021-06-29 20:53:59 +02:00

20 lines
597 B
Diff

diff -u b/dmidecode.c b/dmidecode.c
--- b/dmidecode.c
+++ b/dmidecode.c
@@ -90,7 +90,7 @@
#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/bios"
#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"
@@ -3654,7 +3654,5 @@
{
if (addrtype == 0x1) /* IPv4 */
return inet_ntop(AF_INET, data, storage, 64);
- if (addrtype == 0x2) /* IPv6 */
- return inet_ntop(AF_INET6, data, storage, 64);
return out_of_spec;
}