On Wed, 15 Mar 2023 10:01:43 +0800
Lichen Liu <lichliu(a)redhat.com> wrote:
Hi Philipp,
I see get_all_kdump_crypt_dev() will call kdump_get_maj_min(), maybe should
be replaced with get_maj_min().
Ouch! I wonder how I missed that...
I've fixed it locally but will wait with sending the v2 for a couple of
days in case you find more.
Thanks!
Philipp
Lichen
On Tue, Mar 14, 2023 at 12:17 AM Philipp Rudo <prudo(a)redhat.com> wrote:
>
> Drop the function in favor of the identical get_maj_min function from
> dracut-functions.
>
> Signed-off-by: Philipp Rudo <prudo(a)redhat.com>
> ---
> kdump-lib.sh | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/kdump-lib.sh b/kdump-lib.sh
> index 722616c..495994f 100755
> --- a/kdump-lib.sh
> +++ b/kdump-lib.sh
> @@ -7,6 +7,8 @@ if [[ ${__SOURCED__:+x} ]]; then
> else
> . /lib/kdump/kdump-lib-initramfs.sh
> fi
> +[[ $dracutbasedir ]] || dracutbasedir=/usr/lib/dracut
> +. $dracutbasedir/dracut-functions.sh
>
> FADUMP_ENABLED_SYS_NODE="/sys/kernel/fadump_enabled"
> FADUMP_REGISTER_SYS_NODE="/sys/kernel/fadump_registered"
> @@ -852,18 +854,6 @@ get_luks_crypt_dev()
> done
> }
>
> -# kdump_get_maj_min <device>
> -# Prints the major and minor of a device node.
> -# Example:
> -# $ get_maj_min /dev/sda2
> -# 8:2
> -kdump_get_maj_min()
> -{
> - local _majmin
> - _majmin="$(stat -L -c '%t:%T' "$1" 2>
/dev/null)"
> - printf "%s" "$((0x${_majmin%:*})):$((0x${_majmin#*:}))"
> -}
> -
> get_all_kdump_crypt_dev()
> {
> local _dev
> --
> 2.39.2
> _______________________________________________
> 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