All of lore.kernel.org
 help / color / mirror / Atom feed
* master - fsadm: minor fixes for crypt support
@ 2017-10-10 13:52 Ondrej Kozina
  0 siblings, 0 replies; only message in thread
From: Ondrej Kozina @ 2017-10-10 13:52 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=59145715f12c65bca68d28bd7e04e660752d6760
Commit:        59145715f12c65bca68d28bd7e04e660752d6760
Parent:        27ef503b35daf63b5cf8c1af3b009abe61335759
Author:        Ondrej Kozina <okozina@redhat.com>
AuthorDate:    Tue Oct 10 15:21:28 2017 +0200
Committer:     Ondrej Kozina <okozina@redhat.com>
CommitterDate: Tue Oct 10 15:21:35 2017 +0200

fsadm: minor fixes for crypt support

drop useless asterisk expansion
enforce matching string prefix by adding ^
---
 scripts/fsadm.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index da687fd..a0a75b6 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -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)
 }
 



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-10 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 13:52 master - fsadm: minor fixes for crypt support Ondrej Kozina

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.