From 7d310950a6713ecb4807679bb346006ecb1518eb Mon Sep 17 00:00:00 2001 From: Dave Anderson Date: Tue, 6 Oct 2015 09:44:46 -0400 Subject: [PATCH] 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) --- diskdump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskdump.c b/diskdump.c index 2dbe472..36d2e24 100644 --- a/diskdump.c +++ b/diskdump.c @@ -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") &&