fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Anand Jain <anand.jain@oracle.com>, fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] fstests: common/btrfs: use complete sub command
Date: Mon, 10 Feb 2020 17:52:20 +0200	[thread overview]
Message-ID: <aab31229-ebe6-7319-6b49-75ec448ad3f3@suse.com> (raw)
In-Reply-To: <20200210031322.1177-1-anand.jain@oracle.com>



On 10.02.20 г. 5:13 ч., Anand Jain wrote:
> Grep failed to find this subcommand of btrfs, leading to a wrong
> inference for a moment.
> 
> Make sure we use the full subcommand name in the btrfs command.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

NAK.

It's not entirely clearly what this patch fixes, since grep doesn't
interact with the subcomand at all, it interacts with its result.
Furthermore command expansion is performed by btrfs-completion script so
fixes about command expansion should go there.
> ---
>  common/btrfs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/btrfs b/common/btrfs
> index 19ac7cc4b18c..33ad7e3b41cc 100644
> --- a/common/btrfs
> +++ b/common/btrfs
> @@ -7,7 +7,7 @@ _btrfs_get_subvolid()
>  	mnt=$1
>  	name=$2
>  
> -	$BTRFS_UTIL_PROG sub list $mnt | grep $name | awk '{ print $2 }'
> +	$BTRFS_UTIL_PROG subvolume list $mnt | grep $name | awk '{ print $2 }'
>  }
>  
>  # _require_btrfs_command <command> [<subcommand>|<option>]
> 

      parent reply	other threads:[~2020-02-10 15:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10  3:13 [PATCH] fstests: common/btrfs: use complete sub command Anand Jain
2020-02-10 12:03 ` Marcos Paulo de Souza
2020-02-11  0:45   ` Anand Jain
2020-02-10 15:52 ` Nikolay Borisov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aab31229-ebe6-7319-6b49-75ec448ad3f3@suse.com \
    --to=nborisov@suse.com \
    --cc=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).