summaryrefslogtreecommitdiff
path: root/debian/patches/0140-Fix_scan_entry_point.patch
blob: 9a8aa93a0eafdb9477c9e4c329d82b209c7d3903 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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))