From 2826606b7cb824c60af2cfaa87e138cdb29a67ab Mon Sep 17 00:00:00 2001 From: Packit Bot Date: May 04 2021 22:15:54 +0000 Subject: Apply patch 0005-dmidecode-Only-scan-dev-mem-for-entry-point-on-x86.patch patch_name: 0005-dmidecode-Only-scan-dev-mem-for-entry-point-on-x86.patch present_in_specfile: true --- diff --git a/dmidecode.c b/dmidecode.c index 21bfd65..9c1e9c4 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -2,7 +2,7 @@ * DMI Decode * * Copyright (C) 2000-2002 Alan Cox - * Copyright (C) 2002-2018 Jean Delvare + * Copyright (C) 2002-2019 Jean Delvare * * 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 @@ -5538,7 +5538,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 @@ -5642,7 +5642,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) { @@ -5675,6 +5675,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) */ @@ -5717,6 +5718,7 @@ memory_scan: } } } +#endif done: if (!found && !(opt.flags & FLAG_QUIET))