common/rc: Fix _supports_filetype function
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Mon, 16 Jan 2017 08:07:20 +0000 (16:07 +0800)
committerEryu Guan <eguan@redhat.com>
Mon, 16 Jan 2017 09:21:27 +0000 (17:21 +0800)
generic/401 failed on RHEL6.8GA because "--output=xxx"
option is not supported by df.  So we remove it.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc

index 892c46e885320e313267067c229a65a3333d102a..862bc048de462dcf2abf98e5e22b1c798a7f536f 100644 (file)
--- 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