For easier and more effective testing of btrfs tempfsid, newer versions of mkfs.btrfs contain options such as --device-uuid. Check if the currently running mkfs.btrfs contains this option. Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> --- common/btrfs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/common/btrfs b/common/btrfs index 61d5812d49d9..9a7fa2c71ec5 100644 --- a/common/btrfs +++ b/common/btrfs @@ -88,6 +88,22 @@ _require_btrfs_mkfs_feature() _notrun "Feature $feat not supported in the available version of mkfs.btrfs" } +_require_btrfs_mkfs_uuid_option() +{ + local cnt + local feature + + if [ -z $1 ]; then + echo "Missing option name argument for _require_btrfs_mkfs_option" + exit 1 + fi + feature=$1 + cnt=$($MKFS_BTRFS_PROG --help 2>&1 |grep -E --count "\-\-uuid|\-\-device-uuid") + if [ $cnt != 2 ]; then + _notrun "Require $MKFS_BTRFS_PROG with --uuid and --device-uuid option" + fi +} + _require_btrfs_fs_feature() { if [ -z $1 ]; then -- 2.39.3