Skip to contentSkip to conversation

master - fsadm: all path define MAJOR MINOR

PATCH Zdenek Kabelac 1 participant 1 message May 10, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a1a9ae0aa5fe337935091320b6f27fb053381ff5
Commit:        a1a9ae0aa5fe337935091320b6f27fb053381ff5
Parent:        8ea33b633a1d856a4347f6ecf98a50c1d2b60d76
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed May 10 15:23:54 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Wed May 10 15:40:32 2017 +0200

fsadm: all path define MAJOR MINOR

---
 scripts/fsadm.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
scripts/fsadm.sh +2 -0
index 5574143..534aac1 100755
@@ -191,6 +191,8 @@ detect_fs() {
 	  /dev/dm-[0-9]*)
 		read </sys/block/${RVOLUME#/dev/}/dm/name SYSVOLUME 2>&1 && VOLUME="$DM_DEV_DIR/mapper/$SYSVOLUME"
 		read </sys/block/${RVOLUME#/dev/}/dev MAJORMINOR 2>&1 || error "Cannot get major:minor for \"$VOLUME\"."
+		MAJOR=${MAJORMINOR%%:*}
+		MINOR=${MAJORMINOR##*:}
 		;;
 	  *)
 		STAT=$(stat --format "MAJOR=\$((0x%t)) MINOR=\$((0x%T))" ${RVOLUME})