xfs: abstract xfs_info into $XFS_INFO_PROG

Abstract calls to xfs_info into $XFS_INFO_PROG like we do for all
other xfs utilities.

[Eryu: require xfs_info to be present if FSTYP is xfs]

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2018-06-05 09:43:27 -07:00
committed by Eryu Guan
parent 0fca2e5233
commit 4609a0009d
34 changed files with 47 additions and 45 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ _scratch_mkfs_xfs > /dev/null
echo "+ mount fs image"
_scratch_mount
xfs_info "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
$XFS_INFO_PROG "${SCRATCH_MNT}" | grep -q "finobt=1" || _notrun "finobt not enabled"
blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")"
echo "+ make some files"
@@ -82,7 +82,7 @@ for x in `seq 2 64`; do
touch "${TESTFILE}.${x}"
done
inode="$(stat -c '%i' "${TESTFILE}.1")"
agcount="$(xfs_info "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
agcount="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep agcount= | sed -e 's/^.*agcount=\([0-9]*\),.*$/\1/g')"
umount "${SCRATCH_MNT}"
echo "+ check fs"