Display a machine-type mismatch warning if a little-endian PPC64

compressed kdump created by makedumpfile(8) is used as an argument
with a non-PPC64 crash utility binary.  Without the patch, the
dumpfile is accepted, and the session subsequently fails with a
message indicating that that the vmlinux and dumpfile do not match.
(anderson@redhat.com)
This commit is contained in:
Dave Anderson 2015-10-06 09:44:46 -04:00
parent 4602d53a0e
commit 7d310950a6

View File

@ -548,7 +548,7 @@ restart:
else if (STREQ(header->utsname.machine, "ppc") &&
machine_type_mismatch(file, "PPC", NULL, 0))
goto err;
else if (STREQ(header->utsname.machine, "ppc64") &&
else if (STRNEQ(header->utsname.machine, "ppc64") &&
machine_type_mismatch(file, "PPC64", NULL, 0))
goto err;
else if (STRNEQ(header->utsname.machine, "arm") &&