The patch has been merged, thanks to Pingfan and Philipp!
On Tue, May 09, 2023 at 01:23:35PM +0200, Philipp Rudo wrote:
Hi Pingfan
On Thu, 20 Apr 2023 11:26:34 +0800
Pingfan Liu <piliu(a)redhat.com> wrote:
> On aarch64, a 64k kernel's name looks like:
> vmlinuz-5.14.0-300.el9.aarch64+64k and the corresponding debug kernel's
> name looks like: vmlinuz-5.14.0-300.el9.aarch64+64k-debug, which ends
> with the suffix -debug instead of +debug.
>
> Fix the matching pattern by [+|-]debug
>
> Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
> ---
> kdump-lib.sh | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kdump-lib.sh b/kdump-lib.sh
> index 75b31b2..20d2d0c 100755
> --- a/kdump-lib.sh
> +++ b/kdump-lib.sh
> @@ -523,12 +523,13 @@ _get_kdump_kernel_version()
> fi
>
> _version=$(uname -r)
> - if [[ ! "$_version" =~ \+debug$ ]]; then
> + if [[ ! "$_version" =~ [+|-]debug$ ]]; then
> echo "$_version"
> return
> fi
>
> _version_nondebug=${_version%+debug}
> + _version_nondebug=${_version_nondebug%-debug}
it's a matter of taste but as we know that the version ends in
[+|-]debug you could also simply use
# 6 = strlen([+|-]debug)
_version_nondebug=${_version::-6}
Anyway
Reviewed-by: Philipp Rudo <prudo(a)redhat.com>
> if [[ -f "$(prepare_kdump_kernel "$_version_nondebug")" ]];
then
> dinfo "Use of debug kernel detected. Trying to use $_version_nondebug"
> echo "$_version_nondebug"
_______________________________________________
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, report it:
https://pagure.io/fedora-infrastructure/new_issue