master - pvremove: use common toollib processing code
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=04d34da706a596b7c1d7c5376fb42aa99374fc51 Commit: 04d34da706a596b7c1d7c5376fb42aa99374fc51 Parent: 30c69b3f8ac6c2a4c8b1a47b1482ac4b6a7b8d2e Author: David Teigland <[email protected]> AuthorDate: Tue Feb 16 15:00:50 2016 -0600 Committer: David Teigland <[email protected]> CommitterDate: Thu Feb 25 09:14:09 2016 -0600
pvremove: use common toollib processing code
Use the new pvcreate_each_device() function from
toollib.
--- lib/metadata/metadata-exported.h | 2 + tools/commands.h | 2 +- tools/pvremove.c | 48 +++++-- tools/toollib.c | 282 ++++++++++++++++++++++++++++++++------ 4 files changed, 276 insertions(+), 58 deletions(-)
lib/metadata/metadata-exported.h +2 -0
@@ -591,9 +591,11 @@ struct pvcreate_each_params {struct dm_list arg_process;/* pvcreate_device, used for processing */ struct dm_list arg_confirm;/* pvcreate_device, used for processing */ struct dm_list arg_create;/* pvcreate_device, used for pvcreate */ +struct dm_list arg_remove;/* pvcreate_device, used for pvremove */ struct dm_list arg_fail;/* pvcreate_device, failed to create */ struct dm_list pvs;/* pv_list, created and usable for vgcreate/vgextend */ const char *orphan_vg_name; + unsigned is_remove : 1; /* is removing PVs, not creating */ unsigned preserve_existing : 1; unsigned check_failed : 1; };
tools/commands.h +1 -1
@@ -911,7 +911,7 @@ xx(lvpoll,xx (pvremove,"Remove LVM label(s) from physical volume(s)" , -0 , +ENABLE_ALL_DEVS ,"pvremove\n" "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n"
tools/pvremove.c +33 -15
66 lines not on this page · raw message
tools/toollib.c +240 -42
422 lines not on this page · raw message