diff mbox series

[v3,2/4] common: hide permision warning from mkswap for exfat

Message ID 20210415094905.61853-3-preichl@redhat.com (mailing list archive)
State New, archived
Headers show
Series Fix some tests that fail for exfat FS | expand

Commit Message

Pavel Reichl April 15, 2021, 9:49 a.m. UTC
exfat does not support posix file permisions, so warning from mkswap is
inavitable. This patch hides the warning message so the test won't fail.

Signed-off-by: Pavel Reichl <preichl@redhat.com>
---
 common/rc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index be292aaf..47098b55 100644
--- a/common/rc
+++ b/common/rc
@@ -2374,7 +2374,8 @@  _format_swapfile() {
 	# Swap files must be nocow on Btrfs.
 	$CHATTR_PROG +C "$fname" > /dev/null 2>&1
 	_pwrite_byte 0x61 0 "$sz" "$fname" >> $seqres.full
-	$MKSWAP_PROG "$fname" >> $seqres.full
+	# Ignore permission complaints on filesystems that don't support perms
+	$MKSWAP_PROG "$fname" 2> >(grep -v 'insecure permission' >&2) >> $seqres.full
 }
 
 # Check that the filesystem supports swapfiles