diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-19 10:30:10 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-12-19 10:30:10 +0100 |
commit | 689a87788019fb7f08affd56d19aedc41c45360d (patch) | |
tree | bc95286555f3fe6b42830b72e69917e1843cd8a0 /debian/patches | |
parent | 167bd837fa161128a25db307c4e34a145d55a654 (diff) |
Fix Scan only /dev/mem for entry point on x86
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0140-Fix_scan_entry_point.patch | 47 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/debian/patches/0140-Fix_scan_entry_point.patch b/debian/patches/0140-Fix_scan_entry_point.patch new file mode 100644 index 0000000..9a8aa93 --- /dev/null +++ b/debian/patches/0140-Fix_scan_entry_point.patch @@ -0,0 +1,47 @@ +Index: trunk/dmidecode.c +=================================================================== +--- trunk.orig/dmidecode.c ++++ trunk/dmidecode.c +@@ -2,7 +2,7 @@ + * DMI Decode + * + * Copyright (C) 2000-2002 Alan Cox <alan@redhat.com> +- * Copyright (C) 2002-2018 Jean Delvare <jdelvare@suse.de> ++ * Copyright (C) 2002-2019 Jean Delvare <jdelvare@suse.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -5534,7 +5534,7 @@ int main(int argc, char * const argv[]) + off_t fp; + size_t size; + int efi; +- u8 *buf; ++ u8 *buf = NULL; + + /* + * We don't want stdout and stderr to be mixed up if both are +@@ -5638,7 +5638,7 @@ int main(int argc, char * const argv[]) + printf("Failed to get SMBIOS data from sysfs.\n"); + } + +- /* Next try EFI (ia64, Intel-based Mac) */ ++ /* Next try EFI (ia64, Intel-based Mac, arm64) */ + efi = address_from_efi(&fp); + switch (efi) + { +@@ -5671,6 +5671,7 @@ int main(int argc, char * const argv[]) + goto done; + + memory_scan: ++#if defined __i386__ || defined __x86_64__ + if (!(opt.flags & FLAG_QUIET)) + printf("Scanning %s for entry point.\n", opt.devmem); + /* Fallback to memory scan (x86, x86_64) */ +@@ -5713,6 +5714,7 @@ memory_scan: + } + } + } ++#endif + + done: + if (!found && !(opt.flags & FLAG_QUIET)) diff --git a/debian/patches/series b/debian/patches/series index e06432c..fb5d205 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,4 @@ #0125-use_read_file_to_read_DMI_table_from_sysfs.patch #0130-use_DWORD_for_table_max_size.patch #0135-hide_fixup_msg.patch +0140-Fix_scan_entry_point.patch |