From: Anand Jain <anand.jain@oracle.com>
To: kreijack@inwind.it, linux-btrfs@vger.kernel.org
Cc: clm@fb.com, dsterba@suse.cz
Subject: Re: [PATCH 2/2] btrfs-progs: device delete to accept devid
Date: Fri, 28 Aug 2015 22:17:02 +0800 [thread overview]
Message-ID: <55E06D5E.90605@oracle.com> (raw)
In-Reply-To: <55D5BA12.20007@inwind.it>
Hi Goffredo,
sorry to have missed this.
On 08/20/2015 07:29 PM, Goffredo Baroncelli wrote:
> Hi Anand
> On 2015-08-14 12:36, Anand Jain wrote:
>> This patch introduces new option <devid> for the command
>>
> [...]
>
>> +
>> + if (is_numerical(argv[i])) {
>> + argv3.devid = arg_strtou64(argv[i]);
>> + its_num = true;
>> + } else if (is_block_device(argv[i])) {
>
>
> please be aware that is_block_device(), returns
> - 1 if the file is a block device,
> - < 0 in case of an error (eg: file not found)
> - 0 otherwise
>
> so I suggest to change the check in
>
> + } else if (is_block_device(argv[i]) == 1) {
>
> [...]
>
oh yes. I didn't notice that.
In fact everywhere we didn't check the return properly.
I wrote a new patch to fix this.
Thanks, Anand
next prev parent reply other threads:[~2015-08-28 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 10:36 [PATCH 0/2] Btrfs-progs: device delete to accept devid Anand Jain
2015-08-14 10:36 ` [PATCH 1/2] btrfs-progs: move is_numerical to utils-lib.h and make it non static Anand Jain
2015-08-14 10:36 ` [PATCH 2/2] btrfs-progs: device delete to accept devid Anand Jain
2015-08-17 7:00 ` Goffredo Baroncelli
2015-08-17 11:17 ` Anand Jain
2015-08-20 11:29 ` Goffredo Baroncelli
2015-08-28 14:17 ` Anand Jain [this message]
2015-08-28 16:56 ` Goffredo Baroncelli
2015-08-28 16:57 ` Goffredo Baroncelli
-- strict thread matches above, loose matches on Subject: below --
2015-04-20 10:29 [PATCH] device delete by devid Anand Jain
2015-04-20 10:29 ` [PATCH 2/2] btrfs-progs: device delete to accept devid Anand Jain
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=55E06D5E.90605@oracle.com \
--to=anand.jain@oracle.com \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=kreijack@inwind.it \
--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).