_dmapi_scratch_mount changes
[xfstests-dev.git] / common.dmapi
index df15da166cc96e2c06ac2c7f8338c0ce19f649e2..239681085c065fa9a2cde6e930ad2bee82c2cf32 100644 (file)
@@ -14,10 +14,16 @@ DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
 
 _dmapi_scratch_mount () {
     if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
 
 _dmapi_scratch_mount () {
     if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
-         `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
+        `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
         #already got dmapi options set
         _scratch_mount
         #already got dmapi options set
         _scratch_mount
+        dmapi_mount_result=$?
     else
         _scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
     else
         _scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
+        dmapi_mount_result=$?
     fi
     fi
-}
+
+    if [ $dmapi_mount_result -ne 0 ] ; then
+        _notrun "Assuming DMAPI modules are not loaded"
+    fi
+}
\ No newline at end of file