Hi Philipp,
On Tue, Feb 22, 2022 at 11:22:20AM +0100, Philipp Rudo wrote:
Hi Coiby,
On Tue, 22 Feb 2022 15:07:12 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
[...]
> >
> > 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.
Thanks for correcting my misunderstanding! But why not simply removing
"return $?" instead?
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
>
--
Best regards,
Coiby