[Patch] fix error case of xen

Akio Takebe takebe_akio at jp.fujitsu.com
Mon Mar 31 13:24:32 EDT 2008


Hi,

Curret kdump-xen with makdumpfile always return 0.
So if we fail to kdump, we will get $?=0.
This patch improve it.

Signed-off-by: Akio Takebe <takebe_akio at jp.fujitsu.com>

--- makedumpfile/makedumpfile.c	2008-03-28 11:32:51.000000000 +0900
+++ makedumpfile.mod/makedumpfile.c	2008-04-01 02:14:12.000000000 +0900
@@ -993,6 +993,8 @@ get_symbol_addr(char *symname)
 		if (!strcmp(sym_name, symname)) {
 			symbol = sym.st_value;
 			break;
+		} else if (i >= (shdr.sh_size/shdr.sh_entsize)-1) {
+			DEBUG_MSG("Can't get symbol of %s.\n", symname);
 		}
 	}
 out:
@@ -6146,7 +6148,8 @@ main(int argc, char *argv[])
 			goto out;
 		}
 		info->dump_level |= DL_EXCLUDE_XEN;
-		return handle_xen();
+		if (!handle_xen())
+			goto out;
 
 	} else if (info->flag_rearrange) {
 		if (!open_files_for_rearranging_dumpdata())


Best Regards,

Akio Takebe




More information about the kexec mailing list