From: Goffredo Baroncelli <kreijack@inwind.it>
To: Anand Jain <anand.jain@oracle.com>, 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: Thu, 20 Aug 2015 13:29:22 +0200 [thread overview]
Message-ID: <55D5BA12.20007@inwind.it> (raw)
In-Reply-To: <1439548611-29730-3-git-send-email-anand.jain@oracle.com>
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) {
[...]
--
gpg @keyserver.linux.it: Goffredo Baroncelli <kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5
next prev parent reply other threads:[~2015-08-20 11:29 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 [this message]
2015-08-28 14:17 ` Anand Jain
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=55D5BA12.20007@inwind.it \
--to=kreijack@inwind.it \
--cc=anand.jain@oracle.com \
--cc=clm@fb.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 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).