LVM2/lib/metadata metadata.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at sourceware.org 2007-07-12 04:12:04
Modified files:
lib/metadata : metadata.c
Log message:
Refactor vg_extend error path.
lib/metadata/metadata.c +7 -5
@@ -249,15 +249,17 @@/* attach each pv */ for (i =0 ; i < pv_count; i++) -if (!_add_pv_to_vg (vg, pv_names[i])) { -log_error ("Unable to add physical volume '%s' to " -"volume group '%s'." , pv_names[i], vg->name); -return 0 ; - } +if (!_add_pv_to_vg (vg, pv_names[i])) + goto bad;/* FIXME Decide whether to initialise and add new mdahs to format instance */ return 1 ; + + bad: +log_error ("Unable to add physical volume '%s' to " +"volume group '%s'." , pv_names[i], vg->name); +return 0 ; }const char *strip_dir (const char *vg_name,const char *dev_dir)