get_maj_min is a dracut function and now it have changed to use a cache
to improve performance, also make it require the caller to setup the
cache manually, else it will raise an error. kexec-tools scirpt can
use it's own version to avoid the cache issue.
We already have a kdump_get_maj_min which is the same with get_maj_min,
just drop all get_maj_min calls and use kdump_get_maj_min.
---
kdumpctl | 2 +-
mkdumprd | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index 978dae5..a53331a 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -452,7 +452,7 @@ check_drivers_modified()
ddebug "MAJ:MIN=$1 drivers='$_drivers'"
}
- check_block_and_slaves_all _record_block_drivers "$(get_maj_min
"$_target")"
+ check_block_and_slaves_all _record_block_drivers "$(kdump_get_maj_min
"$_target")"
fi
# Include watchdog drivers if watchdog module is not omitted
diff --git a/mkdumprd b/mkdumprd
index b518078..c0e8435 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -332,7 +332,7 @@ for_each_block_target()
for dev in $(get_kdump_targets); do
[ -b "$dev" ] || continue
- majmin=$(get_maj_min $dev)
+ majmin=$(kdump_get_maj_min $dev)
check_block_and_slaves $1 $majmin && return 1
done
@@ -380,7 +380,7 @@ check_crypt()
local _dev
for _dev in $(get_kdump_targets); do
- if [[ -n $(get_luks_crypt_dev "$(get_maj_min "$_dev")") ]];
then
+ if [[ -n $(get_luks_crypt_dev "$(kdump_get_maj_min "$_dev")")
]]; then
derror "Device $_dev is encrypted." && return 1
fi
done
--
2.31.1