kdump: Modify kdump script to start the firmware assisted dump.

During service kdump start, if firmware assisted dump is not enabled then
fallback to starting of existing kexec based kdump.  If firmware assisted
is enabled but not running, then start firmware assisted dump by echo'ing
1 to '/sys/kernel/fadump_registered' file.

Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Hari Bathini 2014-07-25 00:08:53 +05:30 committed by WANG Chao
parent e0e70085e1
commit 734790aa75

View File

@ -662,6 +662,29 @@ check_dump_feasibility()
return $?
}
start_fadump()
{
echo 1 > $FADUMP_REGISTER_SYS_NODE
if ! check_current_fadump_status; then
echo "fadump: failed to register"
return 1
fi
echo "fadump: registered successfully"
return 0
}
start_dump()
{
if [ $DEFAULT_DUMP_MODE == "fadump" ]; then
start_fadump
else
load_kdump
fi
return $?
}
start()
{
check_config
@ -703,7 +726,8 @@ start()
echo "Starting kdump: [FAILED]"
return 1
fi
load_kdump
start_dump
if [ $? != 0 ]; then
echo "Starting kdump: [FAILED]"
return 1