public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: fstests@vger.kernel.org
Cc: Luis Chamberlain <mcgrof@kernel.org>, Pavel Reichl <preichl@redhat.com>
Subject: [PATCH] common/rc: fix ignoring of errors on
Date: Wed, 25 Aug 2021 14:15:20 -0700	[thread overview]
Message-ID: <20210825211520.2029257-1-mcgrof@kernel.org> (raw)

Commit 0c95c8acb ("common: hide permision warning from mkswap for
exfat") and commit 08e93fa7c ("generic/554: hide permision warning on
exfat") removed a warning by grepping an error out. It however broke
use on older versions of bash such as 4.4.23:

./common/rc: line 2554: syntax error near unexpected token `>'
./common/rc: line 2554: `       MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2) >> $seqres.full'

Fix both instances by using a $(foo) to run the executable.

Cc: Pavel Reichl <preichl@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 common/rc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/rc b/common/rc
index e0b6d508..46b6b220 100644
--- a/common/rc
+++ b/common/rc
@@ -2550,14 +2550,14 @@ _format_swapfile() {
 	$CHATTR_PROG +C "$fname" > /dev/null 2>&1
 	_pwrite_byte 0x61 0 "$sz" "$fname" >> $seqres.full
 	# Ignore permission complaints on filesystems that don't support perms
-	$MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2) >> $seqres.full
+	$(MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2)) >> $seqres.full
 }
 
 _swapon_file() {
 	local fname="$1"
 
 	# Ignore permission complaints on filesystems that don't support perms
-	swapon "$fname" 2> >(grep -v "insecure permissions" >&2)
+	$(swapon "$fname" 2> >(grep -v "insecure permissions" >&2))
 }
 
 # Check that the filesystem supports swapfiles
-- 
2.30.2


                 reply	other threads:[~2021-08-25 21:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210825211520.2029257-1-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=preichl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox