All of lore.kernel.org
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: dsterba@suse.cz,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH 1/2] btrfs-progs: Remove unnecessary variable devstart from cmd_device_scan()
Date: Fri, 11 Mar 2016 08:18:24 +0900	[thread overview]
Message-ID: <56E200C0.3040002@jp.fujitsu.com> (raw)
In-Reply-To: <20160310132744.GG18908@twin.jikos.cz>

On 2016/03/10 22:27, David Sterba wrote:
> On Thu, Mar 10, 2016 at 08:04:59AM +0900, Satoru Takeuchi wrote:
>> It's unnecessary since it's always 1.
>>
>> Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
>> ---
>> This patch can be applied to devel (commit b2bdd0da8969).
>> ---
>>   cmds-device.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/cmds-device.c b/cmds-device.c
>> index cb470af..78d6535 100644
>> --- a/cmds-device.c
>> +++ b/cmds-device.c
>> @@ -246,7 +246,6 @@ static const char * const cmd_device_scan_usage[] = {
>>   static int cmd_device_scan(int argc, char **argv)
>>   {
>>   	int i;
>> -	int devstart = 1;
>>   	int all = 0;
>>   	int ret = 0;
>>
>> @@ -282,7 +281,7 @@ static int cmd_device_scan(int argc, char **argv)
>>   		goto out;
>>   	}
>>
>> -	for( i = devstart ; i < argc ; i++ ){
>> +	for (i = 1; i < argc; i++) {
>
> Actually it needs to be set to optind before the for cycle, otherwise:
>
>    # btrfs device scan -- /dev/sda
>    ERROR: not a block device: --

Thank you for your comment. I'll fix it.

Satoru

      reply	other threads:[~2016-03-10 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 23:04 [PATCH 1/2] btrfs-progs: Remove unnecessary variable devstart from cmd_device_scan() Satoru Takeuchi
2016-03-09 23:08 ` [PATCH 2/2] btrfs-progs: Describe device scan -d is a deprecated option in manpage Satoru Takeuchi
2016-03-10 13:36   ` David Sterba
2016-03-10 13:27 ` [PATCH 1/2] btrfs-progs: Remove unnecessary variable devstart from cmd_device_scan() David Sterba
2016-03-10 23:18   ` Satoru Takeuchi [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=56E200C0.3040002@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=dsterba@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.