LVM2/tools vgsplit.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at 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 <[email protected]>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86
tools/vgsplit.c +6 -3
@@ -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;