From: Dave Wysochanski <dwysocha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Print error if VG already exist.
Date: Thu, 03 Dec 2009 12:15:54 -0500 [thread overview]
Message-ID: <1259860554.2283.0.camel@f10-node1> (raw)
In-Reply-To: <1259850701-32101-1-git-send-email-mbroz@redhat.com>
On Thu, 2009-12-03 at 15:31 +0100, Milan Broz wrote:
> This test have to be moved because of new vg read error handling.
>
> Signed-off-by: Milan Broz <mbroz@redhat.com>
> ---
> tools/vgcreate.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tools/vgcreate.c b/tools/vgcreate.c
> index b1b0c63..8aef7a2 100644
> --- a/tools/vgcreate.c
> +++ b/tools/vgcreate.c
> @@ -55,8 +55,13 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
>
> /* Create the new VG */
> vg = vg_create(cmd, vp_new.vg_name);
> - if (vg_read_error(vg))
> - goto_bad;
> + if (vg_read_error(vg)) {
> + if (vg_read_error(vg) == FAILED_EXIST)
> + log_error("A volume group called %s already exists.", vp_new.vg_name);
> + else
> + log_error("Can't get lock for %s", vp_new.vg_name);
> + goto bad;
> + }
>
> if (!vg_set_extent_size(vg, vp_new.extent_size) ||
> !vg_set_max_lv(vg, vp_new.max_lv) ||
Ack.
Some more cleanup probably warranted but another time and there are
already FIXMEs in the code.
next prev parent reply other threads:[~2009-12-03 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 14:31 [PATCH] Print error if VG already exist Milan Broz
2009-12-03 17:15 ` Dave Wysochanski [this message]
2009-12-03 20:13 ` Petr Rockai
2009-12-03 20:59 ` Dave Wysochanski
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=1259860554.2283.0.camel@f10-node1 \
--to=dwysocha@redhat.com \
--cc=lvm-devel@redhat.com \
/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.