mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-28 02:50:41 +03:00
fsadm: minor fixes for crypt support
drop useless asterisk expansion enforce matching string prefix by adding ^
This commit is contained in:
parent
27ef503b35
commit
59145715f1
@ -548,9 +548,9 @@ detect_luks_device() {
|
||||
return
|
||||
fi
|
||||
|
||||
_LUKS_UUID="CRYPT-LUKS$_LUKS_VERSION-${_LUKS_UUID//[UID:[:space:]-]/}-*"
|
||||
_LUKS_UUID="CRYPT-LUKS$_LUKS_VERSION-${_LUKS_UUID//[UID:[:space:]-]/}-"
|
||||
|
||||
CRYPT_NAME=$(dmsetup info -c --noheadings -S "UUID=~$_LUKS_UUID&&segments=1&&devnos_used='$MAJOR:$MINOR'" -o name)
|
||||
CRYPT_NAME=$(dmsetup info -c --noheadings -S "UUID=~^$_LUKS_UUID&&segments=1&&devnos_used='$MAJOR:$MINOR'" -o name)
|
||||
test -z "$CRYPT_NAME" || CRYPT_DATA_OFFSET=$(dmsetup table $CRYPT_NAME | cut -d ' ' -f 8)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user