[PATCH v4 4/4] makedumpfile: Fix reassemble_kdump_header()

Zhou Wenjian zhouwj-fnst at cn.fujitsu.com
Sun Oct 19 19:48:46 PDT 2014


fix it to take over incomplete flags of all dump file

Singed-of-by: Zhou Wenjian <zhouwj-fnst at cn.fujitsu.com>
---
 makedumpfile.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index 4dba83e..f072069 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -8695,8 +8695,14 @@ reassemble_kdump_header(void)
 	/*
 	 * Write common header.
 	 */
-	if (!read_disk_dump_header(&dh, SPLITTING_DUMPFILE(0)))
-		return FALSE;
+	int i;
+	for ( i = 0; i < info->num_dumpfile; i++){
+		if (!read_disk_dump_header(&dh, SPLITTING_DUMPFILE(i)))
+			return FALSE;
+		int status = dh.status & DUMP_DH_COMPRESSED_INCOMPLETE;
+		if (status)
+			break;
+	}
 
 	if (lseek(info->fd_dumpfile, 0x0, SEEK_SET) < 0) {
 		ERRMSG("Can't seek a file(%s). %s\n",
-- 
1.7.1




More information about the kexec mailing list