From 64c0bfcc535ebdbf9524bcb6f59657c2f3a6d8a3 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Sep 21 2023 06:29:58 +0000 Subject: kdumpctl: remove unnecessary uses of $? Resolves: bz2232499 Upstream: Fedora Rawhide Conflict: None commit b49083126fcdd5be8cb7d84e0048ac2adddb6aed Author: Philipp Rudo Date: Fri Mar 25 15:47:00 2022 +0100 kdumpctl: remove unnecessary uses of $? Signed-off-by: Philipp Rudo Reviewed-by: Tao Liu Reviewed-by: Coiby Xu Signed-off-by: Lichen Liu --- diff --git a/kdumpctl b/kdumpctl index dbcc502..98c72ef 100755 --- a/kdumpctl +++ b/kdumpctl @@ -125,7 +125,6 @@ rebuild_fadump_initrd() check_earlykdump_is_enabled() { grep -q -w "rd.earlykdump" /proc/cmdline - return $? } rebuild_kdump_initrd() @@ -155,8 +154,6 @@ rebuild_initrd() else rebuild_kdump_initrd fi - - return $? } #$1: the files to be checked with IFS=' ' @@ -626,7 +623,6 @@ check_rebuild() dinfo "Rebuilding $TARGET_INITRD" rebuild_initrd - return $? } # On ppc64le LPARs, the keys trusted by firmware do not end up in @@ -868,8 +864,6 @@ check_current_status() else check_current_kdump_status fi - - return $? } save_raw() @@ -998,7 +992,6 @@ check_dump_feasibility() fi check_kdump_feasibility - return $? } start_fadump() @@ -1020,8 +1013,6 @@ start_dump() else load_kdump fi - - return $? } check_failure_action_config() @@ -1130,7 +1121,7 @@ reload() if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then reload_fadump - return $? + return else if ! stop_kdump; then derror "Stopping kdump: [FAILED]" @@ -1194,7 +1185,7 @@ reload_fadump() # to handle such scenario. if stop_fadump; then start_fadump - return $? + return fi fi @@ -1233,7 +1224,6 @@ rebuild() dinfo "Rebuilding $TARGET_INITRD" rebuild_initrd - return $? } check_vmlinux() @@ -1907,5 +1897,3 @@ single_instance_lock exec 9<&- main "$@" ) - -exit $?