xfs: fix more xfs_db open-coding instances
[xfstests-dev.git] / tests / xfs / 307
index 2a99459cfac9fdcc053a2a878066df27d8e4c353..4ce3e66342b5816f253015ccfa936a9149f41cde 100755 (executable)
@@ -59,7 +59,7 @@ _get_agf_data() {
        field="$1"
        shift
 
        field="$1"
        shift
 
-       xfs_db -c 'agf 1' "$@" -c "p $field" $SCRATCH_DEV | awk '{print $3}'
+       _scratch_xfs_db -c 'agf 1' "$@" -c "p $field"  | awk '{print $3}'
 }
 
 _set_agf_data() {
 }
 
 _set_agf_data() {
@@ -67,14 +67,14 @@ _set_agf_data() {
        value="$2"
        shift; shift
 
        value="$2"
        shift; shift
 
-       xfs_db -x -c 'agf 1' "$@" -c "write $field -- $value" $SCRATCH_DEV >> $seqres.full
+       _scratch_xfs_db -x -c 'agf 1' "$@" -c "write $field -- $value"  >> $seqres.full
 }
 
 _get_sb_data() {
        field="$1"
        shift
 
 }
 
 _get_sb_data() {
        field="$1"
        shift
 
-       xfs_db -c 'sb 0' "$@" -c "p $field" $SCRATCH_DEV | awk '{print $3}'
+       _scratch_xfs_db -c 'sb 0' "$@" -c "p $field"  | awk '{print $3}'
 }
 
 _set_sb_data() {
 }
 
 _set_sb_data() {
@@ -82,7 +82,7 @@ _set_sb_data() {
        value="$2"
        shift; shift
 
        value="$2"
        shift; shift
 
-       xfs_db -x -c 'sb 0' "$@" -c "write $field -- $value" $SCRATCH_DEV >> $seqres.full
+       _scratch_xfs_db -x -c 'sb 0' "$@" -c "write $field -- $value"  >> $seqres.full
 }
 
 _filter_leftover() {
 }
 
 _filter_leftover() {
@@ -91,17 +91,17 @@ _filter_leftover() {
 
 _dump_status() {
        echo "** " "$@"
 
 _dump_status() {
        echo "** " "$@"
-       xfs_db -c 'sb 0' -c p $SCRATCH_DEV
+       _scratch_xfs_db -c 'sb 0' -c p
        echo "** agf header"
        echo "** agf header"
-       xfs_db -c 'agf 1' -c p $SCRATCH_DEV
+       _scratch_xfs_db -c 'agf 1' -c p
        echo "** refcntbt"
        echo "** refcntbt"
-       xfs_db -c 'agf 1' -c 'addr refcntroot' -c p $SCRATCH_DEV
+       _scratch_xfs_db -c 'agf 1' -c 'addr refcntroot' -c p
        echo "** rmapbt"
        echo "** rmapbt"
-       test $is_rmap -gt 0 && xfs_db -c 'agf 1' -c 'addr rmaproot' -c p $SCRATCH_DEV
+       test $is_rmap -gt 0 && _scratch_xfs_db -c 'agf 1' -c 'addr rmaproot' -c p
        echo "** bnobt"
        echo "** bnobt"
-       xfs_db -c 'agf 1' -c 'addr bnoroot' -c p $SCRATCH_DEV
+       _scratch_xfs_db -c 'agf 1' -c 'addr bnoroot' -c p
        echo "** cntbt"
        echo "** cntbt"
-       xfs_db -c 'agf 1' -c 'addr cntroot' -c p $SCRATCH_DEV
+       _scratch_xfs_db -c 'agf 1' -c 'addr cntroot' -c p
 }
 
 echo "We need AG1 to have a single free extent"
 }
 
 echo "We need AG1 to have a single free extent"