Hi Philipp,
I see get_all_kdump_crypt_dev() will call kdump_get_maj_min(), maybe should
be replaced with get_maj_min().
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