common: convert to SPDX license tags
[xfstests-dev.git] / common / dmapi
1 ##/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # dmapi functions
6
7 # Commands relitive to dmapi qa
8
9 DMAPI_QASUITE1_DIR=$here/dmapi/src/suite1/
10 DMAPI_QASUITE2_DIR=$here/dmapi/src/suite2/
11 DMAPI_COMMON_DIR=$here/dmapi/src/common/
12
13 DMAPI_LS_TO_COPY_PATH=$DMAPI_QASUITE2_DIR/bindir/ls_to_copy
14
15 _dmapi_scratch_mount () {
16     if [ `echo "$MOUNT_OPTIONS" | grep -c dmapi` -gt 0 -o \
17         `echo "$MOUNT_OPTIONS" | grep -c dmi` -gt 0 ] ; then
18         #already got dmapi options set
19         _try_scratch_mount
20         dmapi_mount_result=$?
21     else
22         _try_scratch_mount "-o dmapi,mtpt=$SCRATCH_MNT"
23         dmapi_mount_result=$?
24     fi
25
26     if [ $dmapi_mount_result -ne 0 ] ; then
27         _notrun "Assuming DMAPI modules are not loaded"
28     fi
29 }
30
31