xfs: fix more xfs_db open-coding instances
[xfstests-dev.git] / tests / xfs / 021
index a5480927e363e5d27a5bfeab43d182f793c97965..67a4346bbff12f2db7e3978a54821a9709e6ce16 100755 (executable)
@@ -37,7 +37,7 @@ status=0      # success is the default!
 _cleanup()
 {
        echo "*** unmount"
-       umount $SCRATCH_MNT 2>/dev/null
+       _scratch_unmount 2>/dev/null
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -80,7 +80,7 @@ _require_scratch
 _require_attrs
 
 rm -f $seqres.full
-umount $SCRATCH_DEV >/dev/null 2>&1
+_scratch_unmount >/dev/null 2>&1
 
 echo "*** mkfs"
 _scratch_mkfs_xfs >/dev/null \
@@ -125,19 +125,19 @@ echo ""
 inum_2=`ls -li $testfile.2 | $AWK_PROG '{ print $1 }'`
 
 echo "*** unmount FS"
-umount $SCRATCH_DEV >>$seqres.full 2>&1 \
+_scratch_unmount >>$seqres.full 2>&1 \
        || _fail "umount failed"
 
 echo "*** dump attributes (1)"
 
-xfs_db -r -c "inode $inum_1" -c "print a.sfattr" $SCRATCH_DEV | \
+_scratch_xfs_db -r -c "inode $inum_1" -c "print a.sfattr"  | \
        sed -e '/secure = /d' | sed -e '/parent = /d'
 
 echo "*** dump attributes (2)"
 
 # There is a fair bit of filtering here to convert v5 filesystem output
 # into the v4 format that holds the meaningful information for the test.
-xfs_db -r -c "inode $inum_2" -c "a a.bmx[0].startblock" -c print $SCRATCH_DEV \
+_scratch_xfs_db -r -c "inode $inum_2" -c "a a.bmx[0].startblock" -c print  \
        | perl -ne '
 s/,secure//;
 s/,parent//;