From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11453 invoked by alias); 2 Sep 2009 21:25:45 -0000 Received: (qmail 11413 invoked by uid 9657); 2 Sep 2009 21:25:45 -0000 Date: Wed, 02 Sep 2009 21:25:00 -0000 Message-ID: <20090902212545.11411.qmail@sourceware.org> From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/tools vgsplit.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00010.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2009-09-02 21:25:45 Modified files: tools : vgsplit.c Log message: Refactor vgsplit to move existing_vg logic in a separate 'if' statement. This will aid in future refactorings and allow for us to reorder the source and destination vg based on alphabetical names. Should be no functional change. Author: Dave Wysochanski Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86 --- LVM2/tools/vgsplit.c 2009/07/14 02:16:05 1.85 +++ LVM2/tools/vgsplit.c 2009/09/02 21:25:44 1.86 @@ -290,6 +290,11 @@ goto bad2; } + } else if (vg_read_error(vg_to) == SUCCESS) { + existing_vg = 0; + } + + if (existing_vg) { if (new_vg_option_specified(cmd)) { log_error("Volume group \"%s\" exists, but new VG " "option specified", vg_name_to); @@ -297,9 +302,7 @@ } if (!vgs_are_compatible(cmd, vg_from,vg_to)) goto_bad; - } else if (vg_read_error(vg_to) == SUCCESS) { - existing_vg = 0; - + } else { vp_def.vg_name = NULL; vp_def.extent_size = vg_from->extent_size; vp_def.max_pv = vg_from->max_pv;