From: Qu Wenruo Date: Thu, 8 Dec 2016 08:12:12 +0000 (+0800) Subject: common/btrfs: rename and enhance _require_btrfs to _require_btrfs_command X-Git-Tag: v2022.05.01~2279 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=47bb69de19c601dcf18f42b7f109a6ee9f8edd19;p=users%2Fhch%2Fxfstests-dev.git common/btrfs: rename and enhance _require_btrfs to _require_btrfs_command Rename _require_btrfs() to _require_btrfs_command() to avoid confusion, as all other _require_btrfs_* has a quite clear suffix, like _require_btrfs_mkfs_feature() or _require_btrfs_fs_feature(). Also enhance _require_btrfs_command() to accept 2nd level commands or options. Options will be determined by the first "-" char. This is quite useful for case like "btrfs inspect-internal dump-tree" and "btrfs check --qgroup-report". [eguan: make local vars in _require_btrfs_command "local"] Signed-off-by: Qu Wenruo Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/btrfs b/common/btrfs index ab6497daf..d9350ea5a 100644 --- a/common/btrfs +++ b/common/btrfs @@ -10,16 +10,35 @@ _btrfs_get_subvolid() $BTRFS_UTIL_PROG sub list $mnt | grep $name | awk '{ print $2 }' } +# _require_btrfs_command [|