Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dracut/99earlykdump/early-kdump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ early_kdump_load() {
fi

if is_fadump_capable; then
dwarn "WARNING: early kdump doesn't support fadump."
dwarn "Early kdump doesn't support fadump."
return 1
fi

Expand Down
2 changes: 1 addition & 1 deletion kdump-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ prepare_kexec_args()
if [[ $? == 1 ]]; then
found_elf_args=$(echo "$kexec_args" | grep elf32-core-headers)
if [[ -n $found_elf_args ]]; then
dwarn "Warning: elf32-core-headers overrides correct elf64 setting"
dwarn "elf32-core-headers overrides correct elf64 setting"
else
kexec_args="$kexec_args --elf64-core-headers"
fi
Expand Down
20 changes: 1 addition & 19 deletions kdump-logger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ dlog_init()
{
:
}
unset dwarning
dwarning()
{
:
}
fi

if [ "$kdump_stdloglvl" -lt 1 ] && [ "$kdump_kmsgloglvl" -lt 1 ] && [ "$kdump_sysloglvl" -lt 1 ]; then
Expand Down Expand Up @@ -368,20 +363,7 @@ dinfo()
dwarn()
{
set +x
dlog 2 "$@"
if [ -n "$debug" ]; then
set -x
fi
}

## @brief It's an alias to dwarn() function.
#
# @param msg Message.
# @retval 0 It's always returned, even if logging failed.
dwarning()
{
set +x
dwarn "$@"
dlog 2 "WARNING:" "$@"
if [ -n "$debug" ]; then
set -x
fi
Expand Down
41 changes: 24 additions & 17 deletions kdumpctl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ rebuild_kdump_initrd()
fi

if check_earlykdump_is_enabled; then
dwarn "Tips: If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump."
dwarn "If early kdump is enabled, also require rebuilding the system initramfs to make the changes take effect for early kdump."
fi

sync -f "$TARGET_INITRD"
Expand Down Expand Up @@ -274,7 +274,7 @@ backup_default_initrd()

dinfo "Backing up $DEFAULT_INITRD before rebuild."
if ! cp "$DEFAULT_INITRD" "$DEFAULT_INITRD_BAK"; then
dwarn "WARNING: failed to backup $DEFAULT_INITRD."
dwarn "Failed to backup $DEFAULT_INITRD."
rm -f -- "$DEFAULT_INITRD_BAK"
return
fi
Expand Down Expand Up @@ -303,7 +303,7 @@ restore_default_initrd()
# If a backup initrd exists, we must be switching back from
# fadump to kdump. Restore the original default initrd.
if ! sha512sum --status --check "$DEFAULT_INITRD_CHECKSUM"; then
dwarn "WARNING: checksum mismatch! Can't restore original initrd."
dwarn "Checksum mismatch! Can't restore original initrd."
return
fi

Expand Down Expand Up @@ -351,7 +351,7 @@ parse_config()
;;
raw)
if [[ -d "/proc/device-tree/ibm,opal/dump" ]]; then
dwarn "WARNING: Won't capture opalcore when 'raw' dump target is used."
dwarn "Won't capture opalcore when 'raw' dump target is used."
fi
_set_config _fstype "$config_opt" || return 1
config_opt=_target
Expand All @@ -367,12 +367,12 @@ parse_config()
elif [[ -f $config_val ]]; then
config_val=$(/usr/bin/readlink -m "$config_val")
else
dwarn "WARNING: '$config_val' doesn't exist, using default value '$DEFAULT_SSHKEY'"
dwarn "'$config_val' doesn't exist, using default value '$DEFAULT_SSHKEY'"
config_val=$DEFAULT_SSHKEY
fi
;;
default)
dwarn "WARNING: Option 'default' was renamed 'failure_action' and will be removed in the future."
dwarn "Option 'default' was renamed 'failure_action' and will be removed in the future."
dwarn "Please update $KDUMP_CONFIG_FILE to use option 'failure_action' instead."
_set_config failure_action "$config_val" || return 1
;;
Expand Down Expand Up @@ -634,7 +634,7 @@ check_fs_modified()
_new_mntpoint="$(get_kdump_mntpoint_from_target "$_target")"
_dracut_args=$(lsinitrd "$TARGET_INITRD" -f usr/lib/dracut/build-parameter.txt)
if [[ -z $_dracut_args ]]; then
dwarn "Warning: No dracut arguments found in initrd"
dwarn "No dracut arguments found in initrd"
return 0
fi

Expand Down Expand Up @@ -912,7 +912,7 @@ save_raw()
}
check_fs=$(lsblk --nodeps -npo FSTYPE "$raw_target")
if [[ $(echo "$check_fs" | wc -w) -ne 0 ]]; then
dwarn "Warning: Detected '$check_fs' signature on $raw_target, data loss is expected."
dwarn "Detected '$check_fs' signature on $raw_target, data loss is expected."
return 0
fi

Expand Down Expand Up @@ -1029,10 +1029,10 @@ fadump_bootargs_append()
output=$(cat "$FADUMP_APPEND_ARGS_SYS_NODE")
dinfo "fadump: additional parameters for capture kernel: '$output'"
else
dwarn "WARNING: failed to setup additional parameters for fadump capture kernel: '$output'"
dwarn "Failed to setup additional parameters for fadump capture kernel: '$output'"
fi
else
dwarn "WARNING: this kernel does not support passing additional parameters to fadump capture kernel."
dwarn "This kernel does not support passing additional parameters to fadump capture kernel."
fi
}

Expand Down Expand Up @@ -1183,7 +1183,7 @@ prepare_luks()

# Currently only x86_64 is supported
if [[ "$(uname -m)" != "x86_64" ]]; then
dwarn "Warning: Encrypted device is in dump path, which is not recommended, see kexec-kdump-howto.txt for more details."
dwarn "Encrypted device is in dump path, which is not recommended, see kexec-kdump-howto.txt for more details."
return 0
fi

Expand Down Expand Up @@ -1919,11 +1919,18 @@ reset_crashkernel()
else
_has_changed="Updated crashkernel=$_new_ck"
fi
else
# No change needed - crashkernel value is already correct
if [[ -z $_has_changed ]]; then
dinfo "No need to update crashkernel value for kernel=$_kernel, grub entry index=$_grub_entry_index"
fi
fi
if [[ -n $_has_changed ]]; then
check_mem_requirement "$_dump_mode"
_needs_reboot=1
dwarn "$_has_changed for kernel=$_kernel, grub entry index=$_grub_entry_index. Please reboot the system for the change to take effect."
dinfo "$_has_changed for kernel=$_kernel, grub entry index=$_grub_entry_index."
if check_mem_requirement "$_dump_mode"; then
_needs_reboot=1
dwarn "Please reboot the system for the change to take effect."
fi
fi
done <<< "$_grub_entries"

Expand Down Expand Up @@ -2141,7 +2148,7 @@ check_vmcore_creation_status()
[[ $DEFAULT_DUMP_MODE == "kdump" ]] || return

if [[ ! -s $VMCORE_CREATION_STATUS ]]; then
dwarn "Notice: No vmcore creation test performed!"
dwarn "No vmcore creation test performed!"
return
fi

Expand Down Expand Up @@ -2175,10 +2182,10 @@ check_vmcore_creation_status()
dinfo "Notice: Last successful vmcore creation test on $_status_date"
;;
fail)
dwarn "Notice: Last NOT successful vmcore creation test on $_status_date"
dwarn "Last NOT successful vmcore creation test on $_status_date"
;;
manual)
dwarn "Notice: Require manual check for vmcore creation test of $_status_date"
dwarn "Require manual check for vmcore creation test of $_status_date"
;;
*)
derror "Unknown vmcore creation test status: $_status"
Expand Down
6 changes: 3 additions & 3 deletions mkdumprd
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ check_size()
esac || perror_exit "Check dump target size failed"

if [[ $avail -lt $memtotal ]]; then
dwarn "Warning: There might not be enough space to save a vmcore."
dwarn " The size of $2 should be greater than $memtotal kilo bytes."
dwarn "There might not be enough space to save a vmcore."
dwarn "The size of $2 should be greater than $memtotal kilo bytes."
fi
}

Expand Down Expand Up @@ -290,7 +290,7 @@ verify_core_collector()

if [[ $_cmd != "makedumpfile" ]]; then
if is_raw_dump_target; then
dwarn "Warning: specifying a non-makedumpfile core collector, you will have to recover the vmcore manually."
dwarn "Specifying a non-makedumpfile core collector, you will have to recover the vmcore manually."
fi
return
fi
Expand Down
Loading