1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Rename pvcreate_params processing functions to better match <object><action>.

Rename fill_default_pvcreate_params to pvcreate_params_set_defaults.
Rename pvcreate_validate_restore_params to pvcreate_restore_params_validate.
Rename pvcreate_validate_params to pvcreate_params_validate.
This commit is contained in:
Dave Wysochanski 2009-11-01 19:51:54 +00:00
parent 06f97f3be3
commit accb17389c
8 changed files with 14 additions and 14 deletions

View File

@ -372,7 +372,7 @@ struct pvcreate_params {
struct physical_volume *pvcreate_single(struct cmd_context *cmd,
const char *pv_name,
struct pvcreate_params *pp);
void fill_default_pvcreate_params(struct pvcreate_params *pp);
void pvcreate_params_set_defaults(struct pvcreate_params *pp);
/*
* Utility functions

View File

@ -1314,7 +1314,7 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
return 1;
}
void fill_default_pvcreate_params(struct pvcreate_params *pp)
void pvcreate_params_set_defaults(struct pvcreate_params *pp)
{
memset(pp, 0, sizeof(*pp));
pp->zero = 1;
@ -1354,7 +1354,7 @@ struct physical_volume * pvcreate_single(struct cmd_context *cmd,
struct pvcreate_params default_pp;
char buffer[64] __attribute((aligned(8)));
fill_default_pvcreate_params(&default_pp);
pvcreate_params_set_defaults(&default_pp);
if (!pp)
pp = &default_pp;

View File

@ -54,7 +54,7 @@ int lvm_vg_extend(vg_t vg, const char *device)
return -1;
}
fill_default_pvcreate_params(&pp);
pvcreate_params_set_defaults(&pp);
if (!vg_extend(vg, 1, (char **) &device, &pp)) {
unlock_vg(vg->cmd, VG_ORPHANS);
return -1;

View File

@ -23,7 +23,7 @@
* Output arguments:
* pp: structure allocated by caller, fields written / validated here
*/
static int pvcreate_validate_restore_params(struct cmd_context *cmd,
static int pvcreate_restore_params_validate(struct cmd_context *cmd,
int argc, char **argv,
struct pvcreate_params *pp)
{
@ -84,12 +84,12 @@ int pvcreate(struct cmd_context *cmd, int argc, char **argv)
int ret = ECMD_PROCESSED;
struct pvcreate_params pp;
fill_default_pvcreate_params(&pp);
pvcreate_params_set_defaults(&pp);
if (!pvcreate_validate_restore_params(cmd, argc, argv, &pp)) {
if (!pvcreate_restore_params_validate(cmd, argc, argv, &pp)) {
return EINVALID_CMD_LINE;
}
if (!pvcreate_validate_params(cmd, argc, argv, &pp)) {
if (!pvcreate_params_validate(cmd, argc, argv, &pp)) {
return EINVALID_CMD_LINE;
}

View File

@ -1278,7 +1278,7 @@ void lv_spawn_background_polling(struct cmd_context *cmd,
* Output arguments:
* pp: structure allocated by caller, fields written / validated here
*/
int pvcreate_validate_params(struct cmd_context *cmd,
int pvcreate_params_validate(struct cmd_context *cmd,
int argc, char **argv,
struct pvcreate_params *pp)
{

View File

@ -107,7 +107,7 @@ int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv);
int vg_refresh_visible(struct cmd_context *cmd, struct volume_group *vg);
void lv_spawn_background_polling(struct cmd_context *cmd,
struct logical_volume *lv);
int pvcreate_validate_params(struct cmd_context *cmd,
int pvcreate_params_validate(struct cmd_context *cmd,
int argc, char **argv,
struct pvcreate_params *pp);

View File

@ -40,8 +40,8 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
"use --pvmetadatacopies instead.");
return EINVALID_CMD_LINE;
}
fill_default_pvcreate_params(&pp);
if (!pvcreate_validate_params(cmd, argc, argv, &pp)) {
pvcreate_params_set_defaults(&pp);
if (!pvcreate_params_validate(cmd, argc, argv, &pp)) {
return EINVALID_CMD_LINE;
}

View File

@ -37,8 +37,8 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
"use --pvmetadatacopies instead.");
return EINVALID_CMD_LINE;
}
fill_default_pvcreate_params(&pp);
if (!pvcreate_validate_params(cmd, argc, argv, &pp)) {
pvcreate_params_set_defaults(&pp);
if (!pvcreate_params_validate(cmd, argc, argv, &pp)) {
return EINVALID_CMD_LINE;
}