Hi Coiby,
On Tue, 22 Feb 2022 15:07:12 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
On Fri, Feb 04, 2022 at 06:34:18PM +0100, Philipp Rudo wrote:
>Signed-off-by: Philipp Rudo <prudo(a)redhat.com>
>---
> kdumpctl | 16 ++--------------
> 1 file changed, 2 insertions(+), 14 deletions(-)
>
>diff --git a/kdumpctl b/kdumpctl
>index ed772a0..d08b91c 100755
>--- a/kdumpctl
>+++ b/kdumpctl
>@@ -86,7 +86,6 @@ rebuild_fadump_initrd()
> check_earlykdump_is_enabled()
> {
> grep -q -w "rd.earlykdump" /proc/cmdline
>- return $?
> }
>
> rebuild_kdump_initrd()
>@@ -116,8 +115,6 @@ rebuild_initrd()
> else
> rebuild_kdump_initrd
> fi
>-
>- return $?
> }
>
> #$1: the files to be checked with IFS=' '
>@@ -583,7 +580,6 @@ check_rebuild()
>
> dinfo "Rebuilding $TARGET_INITRD"
> rebuild_initrd
>- return $?
> }
>
> # On ppc64le LPARs, the keys trusted by firmware do not end up in
>@@ -814,8 +810,6 @@ check_current_status()
> else
> check_current_kdump_status
> fi
>-
>- return $?
> }
>
> save_raw()
>@@ -944,7 +938,6 @@ check_dump_feasibility()
> fi
>
> check_kdump_feasibility
>- return $?
> }
>
> start_fadump()
>@@ -966,8 +959,6 @@ start_dump()
> else
> load_kdump
> fi
>-
>- return $?
> }
>
> check_failure_action_config()
>@@ -1076,7 +1067,7 @@ reload()
>
> if [[ $DEFAULT_DUMP_MODE == "fadump" ]]; then
> reload_fadump
>- return $?
>+ return
> else
> if ! stop_kdump; then
> derror "Stopping kdump: [FAILED]"
>@@ -1140,7 +1131,7 @@ reload_fadump()
> # to handle such scenario.
> if stop_fadump; then
> start_fadump
>- return $?
>+ return
I'm curious for start_fadump and reload_fadump both of which may return 1,
why only return normal status?
There is no "normal status" you can return. When you omit the return
value 'return' will automatically return the status of the last
executed command. Thus 'return' and 'return $?' are identical.
Same for 'exit'
Thanks
Philipp
> fi
> fi
>
>@@ -1179,7 +1170,6 @@ rebuild()
>
> dinfo "Rebuilding $TARGET_INITRD"
> rebuild_initrd
>- return $?
> }
>
> do_estimate()
>@@ -1711,5 +1701,3 @@ single_instance_lock
> exec 9<&-
> main "$@"
> )
>-
>-exit $?
>--
>2.34.1
>_______________________________________________
>kexec mailing list -- kexec(a)lists.fedoraproject.org
>To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
>Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure