diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2011-11-07 11:01:53 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2011-11-07 11:01:53 +0000 |
commit | e903e37d0a85105a2a3723a70de4ea4fc2cc0ae8 (patch) | |
tree | e9fb88eb7155d850ca31094d932232f0e706ed62 /tools/lvcreate.c | |
parent | 08525624be0ae8b0fce1959673ee64937be9c2af (diff) | |
download | lvm2-e903e37d0a85105a2a3723a70de4ea4fc2cc0ae8.tar.gz lvm2-e903e37d0a85105a2a3723a70de4ea4fc2cc0ae8.tar.xz lvm2-e903e37d0a85105a2a3723a70de4ea4fc2cc0ae8.zip |
Add missing default LVM_VG_NAME
Add support for exported shell variable LVM_VG_NAME also
for thins and snapshots.
Diffstat (limited to 'tools/lvcreate.c')
-rw-r--r-- | tools/lvcreate.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/lvcreate.c b/tools/lvcreate.c index ee5eab9c..e0cca2e4 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -93,6 +93,9 @@ static int _lvcreate_name_params(struct lvcreate_params *lp, lp->origin = ptr + 1; } + if (!lp->vg_name) + _set_vg_name(lp, extract_vgname(cmd, NULL)); + if (!lp->vg_name) { log_error("The origin name should include the " "volume group."); @@ -111,7 +114,10 @@ static int _lvcreate_name_params(struct lvcreate_params *lp, lp->pool = vg_name; if (!_set_vg_name(lp, extract_vgname(cmd, lp->pool))) return_0; - + + if (!lp->vg_name) + _set_vg_name(lp, extract_vgname(cmd, NULL)); + if (!lp->vg_name) { log_error("The pool name should include the " "volume group."); |