Skip to contentSkip to conversation

master - tests: add get first_extent_sector

PATCH Zdenek Kabelac 1 participant 1 message Apr 3, 2015

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bd84389c6867d8d1f1a238361e0d12f01be7a32f
Commit:        bd84389c6867d8d1f1a238361e0d12f01be7a32f
Parent:        308f9bcc18d6c3b5f56b77dedacff4edafeb86fd
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Apr 3 14:20:03 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Apr 3 14:20:03 2015 +0200

tests: add get first_extent_sector

Trvial function to figure out sector position of 1st. extent.

---
 test/lib/get.sh |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
test/lib/get.sh +4 -0
index b6fbf82..ef1ddc4 100644
@@ -87,6 +87,10 @@ lv_tree_devices() {
 	lv_tree_devices_ "$@" | sort | uniq
 }
 
+first_extent_sector() {
+	pv_field "$@" pe_start --units s --nosuffix
+}
+
 #set -x
 unset LVM_VALGRIND
 "$@"