master - move pv_list code into lib
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b6b4ad8e28eff7476cb04c4cb93312b06605b82f Commit: b6b4ad8e28eff7476cb04c4cb93312b06605b82f Parent: 0dd905c959a8f36ea627027336b6d5dafb015001 Author: David Teigland <[email protected]> AuthorDate: Tue Jan 14 14:12:20 2020 -0600 Committer: David Teigland <[email protected]> CommitterDate: Mon Apr 13 10:04:14 2020 -0500
move pv_list code into lib
--- lib/Makefile.in | 1 + lib/metadata/metadata-exported.h | 4 + lib/metadata/pv_list.c | 291 +++++++++++++++++++++++++++++++++++++++ tools/toollib.c | 270 ------------------------------------ tools/toollib.h | 9 -- 5 files changed, 296 insertions(+), 279 deletions(-)
lib/Makefile.in +1 -0
@@ -74,6 +74,7 @@ SOURCES =\ metadata/mirror.c \ metadata/pool_manip.c \ metadata/pv.c \ + metadata/pv_list.c \ metadata/pv_manip.c \ metadata/pv_map.c \ metadata/raid_manip.c \
lib/metadata/metadata-exported.h +4 -0
@@ -1385,4 +1385,8 @@ int vg_is_foreign(struct volume_group *vg);void vg_write_commit_bad_mdas (struct cmd_context *cmd,struct volume_group *vg); +struct dm_list *create_pv_list (struct dm_pool *mem,struct volume_group *vg,int argc, +char **argv,int allocatable_only); +struct dm_list *clone_pv_list (struct dm_pool *mem,struct dm_list *pvsl); +#endif
lib/metadata/pv_list.c new file +291 -0
291 lines not on this page · raw message
tools/toollib.c +0 -270
276 lines not on this page · raw message
tools/toollib.h +0 -9
@@ -182,15 +182,6 @@ void opt_array_to_str(struct cmd_context *cmd, int *opts, int count,int pvcreate_params_from_args (struct cmd_context *cmd,struct pvcreate_params *pp);int pvcreate_each_device (struct cmd_context *cmd,struct processing_handle *handle,struct pvcreate_params *pp); -/* -* Builds a list of pv's from the names in argv. Used in -* lvcreate/extend. -*/ -struct dm_list *create_pv_list (struct dm_pool *mem,struct volume_group *vg,int argc, -char **argv,int allocatable_only); - -struct dm_list *clone_pv_list (struct dm_pool *mem,struct dm_list *pvs); -int vgcreate_params_set_defaults (struct cmd_context *cmd,struct vgcreate_params *vp_def,struct volume_group *vg);