move mount stuff into common quota file, tidy a little, make a default.
[xfstests-dev.git] / common.quota
index 9e7649ad33d79787e87315658d51a96f019e3da9..732fe8b12ef46666f5c7e83f170f8ad91f553447 100644 (file)
@@ -39,7 +39,7 @@
 # 
 _require_quota()
 {
-    src/feature -q $SCRATCH_DEV
+    src/feature -q $TEST_DEV
     [ $? -ne 0 ] && _notrun "Installed kernel does not support XFS quota"
 
     [ ! -x /usr/sbin/repquota ] && _notrun "Quota user tools not installed"
@@ -87,6 +87,13 @@ _filter_repquota()
     perl -ne 's/^(\w+)\s+([-|+])/[NAME]    \2/g; print'
 }
 
+_qmount()
+{
+    umount $SCRATCH_DEV >/dev/null 2>&1
+    mount -t xfs $SCRATCH_DEV $SCRATCH_MNT || _fail "qmount failed"
+    chmod ugo+rwx $SCRATCH_MNT
+    misc/quot $SCRATCH_DEV >>$seq.full 2>&1
+}
 
 # make sure this script returns success
 /bin/true