[PATCH] btrfs: fix _require_btrfs_mkfs_uuid_option

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



currently, this helper causes tests to fail on my system due to
unexpected warning messages about dangling '\' characters from grep.
Change the invocation to not escape the '-' characters but instead to
use -- to instruct grep that the options list is over. Fixes
btrfs/31[345] for me (and I believe the btrfs github ci)

Signed-off-by: Boris Burkov <boris@xxxxxx>
---
 common/btrfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/btrfs b/common/btrfs
index 3eb2a91b7..aa344706c 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -93,7 +93,7 @@ _require_btrfs_mkfs_uuid_option()
 	local cnt
 
 	cnt=$($MKFS_BTRFS_PROG --help 2>&1 | \
-				grep -E --count "\-\-uuid|\-\-device-uuid")
+				grep -E --count -- "--uuid|--device-uuid")
 	if [ $cnt != 2 ]; then
 		_notrun "Require $MKFS_BTRFS_PROG with --uuid and --device-uuid options"
 	fi
-- 
2.43.0





[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux