Add GPL license plate to SGI's files.
[xfstests-dev.git] / common.dmapi
1 ##/bin/sh
2 #
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17 #
18 #
19 # dmapi functions
20 #
21
22 # Commands relitive to dmapi qa
23
24 DMAPI_QASUITE1_DIR=$here/dmapi/src/suite1/
25 DMAPI_QASUITE2_DIR=$here/dmapi/src/suite2/
26 DMAPI_COMMON_DIR=$here/dmapi/src/common/
27
28 DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
29
30 _dmapi_scratch_mount () {
31     if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
32         `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
33         #already got dmapi options set
34         _scratch_mount
35         dmapi_mount_result=$?
36     else
37         _scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
38         dmapi_mount_result=$?
39     fi
40
41     if [ $dmapi_mount_result -ne 0 ] ; then
42         _notrun "Assuming DMAPI modules are not loaded"
43     fi
44 }
45
46