On Mon, Mar 30, 2020 at 03:02:32PM +0800, Qu Wenruo wrote:
> +_is_target_command()
> +{
> + if [[ $1 =~ /btrfs$ ]]; then
> + return 0
> + fi
> + if [[ $1 =~ /mkfs.btrfs$ ]]; then
> + return 0
> + fi
> + if [[ $1 =~ /btrfs-convert$ ]]; then
> + return 0
> + fi
> + return 1
I think we want all commands, so this should also include btrfstune,
btrfs-corrupt-block, btrfs-image, btrfs-select-super, btrfs-find-root.
As the list grew, a shorter form of the checks would be better, like
[[ $1 =~ /btrfs$ ]] && return 0
I'm testing the changes with a stub instrument script, there are some
failures still.