From patchwork Mon Jan 16 08:07:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Yang X-Patchwork-Id: 9518249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8290E601B7 for ; Mon, 16 Jan 2017 08:07:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C66028354 for ; Mon, 16 Jan 2017 08:07:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5051C283CB; Mon, 16 Jan 2017 08:07:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBD7C28354 for ; Mon, 16 Jan 2017 08:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750863AbdAPIHy (ORCPT ); Mon, 16 Jan 2017 03:07:54 -0500 Received: from cn.fujitsu.com ([59.151.112.132]:61511 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750855AbdAPIHa (ORCPT ); Mon, 16 Jan 2017 03:07:30 -0500 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="14798636" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 16 Jan 2017 16:07:27 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (unknown [10.167.33.80]) by cn.fujitsu.com (Postfix) with ESMTP id 39C5647AD1FF; Mon, 16 Jan 2017 16:07:26 +0800 (CST) Received: from localhost.localdomain (10.167.220.62) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 16 Jan 2017 16:07:31 +0800 From: Xiao Yang To: CC: , Xiao Yang Subject: [PATCH v2] common/rc: Fix _supports_filetype function Date: Mon, 16 Jan 2017 16:07:20 +0800 Message-ID: <1484554040-4231-1-git-send-email-yangx.jy@cn.fujitsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <20170116072352.GE1859@eguan.usersys.redhat.com> References: <20170116072352.GE1859@eguan.usersys.redhat.com> MIME-Version: 1.0 X-Originating-IP: [10.167.220.62] X-yoursite-MailScanner-ID: 39C5647AD1FF.AA5A4 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: yangx.jy@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP generic/401 failed on RHEL6.8GA because "--output=xxx" option is not supported by df. So we remove it. Signed-off-by: Xiao Yang --- common/rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/rc b/common/rc index 892c46e..87ef849 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 mntdir=`$DF_PROG $dir | tail -1 | $AWK_PROG '{print $1}'` + tune2fs -l $mntdir | grep -q filetype ;; *) local testfile=$dir/$$.ftype