From 8868a4ffc27ecc26827e3ea2bf5ba52e2d5efb30 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski Date: Tue, 15 Jan 2008 22:56:30 +0000 Subject: Move more parameter validation into the library. Update vgrename to call validate_vg_rename_params(). Fix vgcreate and vgsplit default arguments by adding defaults parameter to fill_vg_create_params(). Add t-vgrename-usage.sh test. Bugzilla: bz251992 --- tools/toollib.c | 32 ++++++++------------------------ tools/toollib.h | 5 ++--- tools/vgcreate.c | 35 +++++++++++++++++++++-------------- tools/vgrename.c | 35 ++++++----------------------------- tools/vgsplit.c | 21 ++++++++++++++------- 5 files changed, 51 insertions(+), 77 deletions(-) --- tools/toollib.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/toollib.h') diff --git a/tools/toollib.h b/tools/toollib.h index b8830d22..6a89867d 100644 --- a/tools/toollib.h +++ b/tools/toollib.h @@ -96,8 +96,7 @@ struct list *clone_pv_list(struct dm_pool *mem, struct list *pvs); int apply_lvname_restrictions(const char *name); -int validate_new_vg_name(struct cmd_context *cmd, const char *vg_name); - int fill_vg_create_params(struct cmd_context *cmd, - char *vg_name, struct vgcreate_params *vp); + char *vg_name, struct vgcreate_params *vp_new, + struct vgcreate_params *vp_def); #endif -- cgit