10409c30531c8647b54c9d2d3de32e2af9e473bf
[xfstests-dev.git] / common.dmapi
1 ##/bin/sh
2 #
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # dmapi functions
6 #
7
8 # Commands relitive to dmapi qa
9
10 DMAPI_QASUITE1_DIR=$here/dmapi/src/suite1/
11 DMAPI_QASUITE2_DIR=$here/dmapi/src/suite2/
12
13 DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
14
15 _dmapi_scratch_mount () {
16     if [ `lsmod | grep -c dmapi` -gt 0 ] ; then
17         if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
18             `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
19             #already got dmapi options set
20             _scratch_mount
21         else
22             _scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
23         fi
24     else
25         _notrun "DMAPI modules not loaded"
26     fi
27 }