From: Xiao Yang Date: Mon, 16 Jan 2017 08:07:20 +0000 (+0800) Subject: common/rc: Fix _supports_filetype function X-Git-Tag: v2022.05.01~2223 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3241b54ed48edd5cc0ecf238b07f5dc4088c3798;p=users%2Fhch%2Fxfstests-dev.git common/rc: Fix _supports_filetype function generic/401 failed on RHEL6.8GA because "--output=xxx" option is not supported by df. So we remove it. Signed-off-by: Xiao Yang Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index 892c46e88..862bc048d 100644 --- a/common/rc +++ b/common/rc @@ -268,14 +268,14 @@ _supports_filetype() { local dir=$1 - local fstyp=$(df --output=fstype $dir | tail -1) + local fstyp=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $2}'` case "$fstyp" in xfs) xfs_info $dir | grep -q "ftype=1" ;; ext2|ext3|ext4) - tune2fs -l $(df --output=source $dir | tail -1) | \ - grep -q filetype + local dev=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'` + tune2fs -l $dev | grep -q filetype ;; *) local testfile=$dir/$$.ftype