]> sourceware.org Git - lvm2.git/commitdiff
Add missing default LVM_VG_NAME
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 7 Nov 2011 11:01:53 +0000 (11:01 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 7 Nov 2011 11:01:53 +0000 (11:01 +0000)
Add support for exported shell variable LVM_VG_NAME also
for thins and snapshots.

WHATS_NEW
tools/lvcreate.c

index c36551b58161138e21d4959826567d7d19b27dc3..8b4219ca8180a5e92ffdd3ae6996909c878aa2cf 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Add missing default $LVM_VG_NAME usage for snapshots.
   Fix extent_count overflow with lvextend.
   Add missing lvrename mirrored log recursion in for_each_sub_lv.
   Improve lv_extend stack reporting.
index ee5eab9cd9ad46603ff184966bfa5973a745a898..e0cca2e4d4431f42e42166dbe2f942bf99f17ad9 100644 (file)
@@ -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.");
This page took 0.048949 seconds and 5 git commands to generate.