summaryrefslogtreecommitdiff
path: root/kexec/kexec.c
diff options
context:
space:
mode:
authorMohan Kumar M <mohan@in.ibm.com>2006-10-09 14:55:58 +0530
committerSimon Horman <horms@verge.net.au>2006-10-13 16:04:16 +0900
commit878e1322daaa34e1b33825642a33d0a027a5d373 (patch)
tree927638a98ca5dadd209479422861021d19cb9ca9 /kexec/kexec.c
parent13882ab8fd1261c378de648bbcc1ed21822a2121 (diff)
Check for crashkernel memory reservation
Check whether memory for crashkernel is reserved by calling arch dependent functions. The patch also creates dummy functions in ppc, ia64 and s390 architectures, so that the build process will not break. The function "is_crashkernel_mem_reserved" needs to be implemented on ppc, ia64 and s390 architectures. Signed-off-by: Mohan Kumar M <mohan@in.ibm.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r--kexec/kexec.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index ce0663e..204a4b8 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -848,6 +848,13 @@ int main(int argc, char *argv[])
}
}
+ if ((kexec_flags & KEXEC_ON_CRASH) && !is_crashkernel_mem_reserved()) {
+ printf("Memory for crashkernel is not reserved\n");
+ printf("Please reserve memory by passing ");
+ printf("\"crashkernel=X@Y\" parameter to the kernel\n");
+ die("Then try loading kdump kernel\n");
+ }
+
fileind = optind;
/* Reset getopt for the next pass; called in other source modules */
opterr = 1;