mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
Rename fill_vg_create_params to vgcreate_params_set_from_args.
Rename fill_vg_create_params to vgcreate_params_set_from_args and remove vg_name parameter from function (caller must set before calling function).
This commit is contained in:
parent
c6ea6bf5b7
commit
2a924b3eaf
@ -1204,16 +1204,16 @@ void vgcreate_params_set_defaults(struct vgcreate_params *vp_def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set members of struct vgcreate_params from cmdline.
|
* Set members of struct vgcreate_params from cmdline arguments.
|
||||||
* Do preliminary validation with arg_*() interface.
|
* Do preliminary validation with arg_*() interface.
|
||||||
* Further, more generic validation is done in validate_vgcreate_params().
|
* Further, more generic validation is done in validate_vgcreate_params().
|
||||||
* This function is to remain in tools directory.
|
* This function is to remain in tools directory.
|
||||||
*/
|
*/
|
||||||
int fill_vg_create_params(struct cmd_context *cmd,
|
int vgcreate_params_set_from_args(struct cmd_context *cmd,
|
||||||
char *vg_name, struct vgcreate_params *vp_new,
|
struct vgcreate_params *vp_new,
|
||||||
struct vgcreate_params *vp_def)
|
struct vgcreate_params *vp_def)
|
||||||
{
|
{
|
||||||
vp_new->vg_name = skip_dev_dir(cmd, vg_name, NULL);
|
vp_new->vg_name = skip_dev_dir(cmd, vp_def->vg_name, NULL);
|
||||||
vp_new->max_lv = arg_uint_value(cmd, maxlogicalvolumes_ARG,
|
vp_new->max_lv = arg_uint_value(cmd, maxlogicalvolumes_ARG,
|
||||||
vp_def->max_lv);
|
vp_def->max_lv);
|
||||||
vp_new->max_pv = arg_uint_value(cmd, maxphysicalvolumes_ARG,
|
vp_new->max_pv = arg_uint_value(cmd, maxphysicalvolumes_ARG,
|
||||||
|
@ -101,10 +101,9 @@ int is_reserved_lvname(const char *name);
|
|||||||
|
|
||||||
void vgcreate_params_set_defaults(struct vgcreate_params *vp_def,
|
void vgcreate_params_set_defaults(struct vgcreate_params *vp_def,
|
||||||
struct volume_group *vg);
|
struct volume_group *vg);
|
||||||
int fill_vg_create_params(struct cmd_context *cmd,
|
int vgcreate_params_set_from_args(struct cmd_context *cmd,
|
||||||
char *vg_name, struct vgcreate_params *vp_new,
|
struct vgcreate_params *vp_new,
|
||||||
struct vgcreate_params *vp_def);
|
struct vgcreate_params *vp_def);
|
||||||
|
|
||||||
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv);
|
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv);
|
||||||
int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg);
|
int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg);
|
||||||
void lv_spawn_background_polling(struct cmd_context *cmd,
|
void lv_spawn_background_polling(struct cmd_context *cmd,
|
||||||
|
@ -46,7 +46,8 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
vgcreate_params_set_defaults(&vp_def, NULL);
|
vgcreate_params_set_defaults(&vp_def, NULL);
|
||||||
if (fill_vg_create_params(cmd, vg_name, &vp_new, &vp_def))
|
vp_def.vg_name = vg_name;
|
||||||
|
if (vgcreate_params_set_from_args(cmd, &vp_new, &vp_def))
|
||||||
return EINVALID_CMD_LINE;
|
return EINVALID_CMD_LINE;
|
||||||
|
|
||||||
if (validate_vg_create_params(cmd, &vp_new))
|
if (validate_vg_create_params(cmd, &vp_new))
|
||||||
|
@ -367,7 +367,8 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
goto_bad;
|
goto_bad;
|
||||||
} else {
|
} else {
|
||||||
vgcreate_params_set_defaults(&vp_def, vg_from);
|
vgcreate_params_set_defaults(&vp_def, vg_from);
|
||||||
if (fill_vg_create_params(cmd, vg_name_to, &vp_new, &vp_def)) {
|
vp_def.vg_name = vg_name_to;
|
||||||
|
if (vgcreate_params_set_from_args(cmd, &vp_new, &vp_def)) {
|
||||||
r = EINVALID_CMD_LINE;
|
r = EINVALID_CMD_LINE;
|
||||||
goto_bad;
|
goto_bad;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user