Add a helper function to get uuid by MAJ:MIN
Resolves: https://issues.redhat.com/browse/RHEL-104940 Conflict: None commit f2c18c4934777cf55a5ea9359c8423adb8f1388b Author: Coiby Xu <coxu@redhat.com> Date: Mon Mar 4 17:18:46 2024 +0800 Add a helper function to get uuid by MAJ:MIN This helper function will be used for kdump LUKS support. Signed-off-by: Coiby Xu <coxu@redhat.com> Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
parent
416b41f578
commit
ec23b276ae
@ -1230,6 +1230,11 @@ get_luks_crypt_dev()
|
||||
done
|
||||
}
|
||||
|
||||
maj_min_to_uuid()
|
||||
{
|
||||
lsblk -no uuid,MAJ:MIN | awk -v dev="$1" 'NF==2 && $2 == dev {print $1}'
|
||||
}
|
||||
|
||||
# kdump_get_maj_min <device>
|
||||
# Prints the major and minor of a device node.
|
||||
# Example:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user