mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
cleanup: standard params ordering
Pass lvconvert_params as last arg.
This commit is contained in:
parent
a0f7d6e36a
commit
228e7ff767
@ -231,8 +231,8 @@ static int _mirror_or_raid_type_requested(struct cmd_context *cmd, const char *t
|
|||||||
return (arg_count(cmd, mirrors_ARG) || !strncmp(type_str, "raid", 4) || !strcmp(type_str, "mirror"));
|
return (arg_count(cmd, mirrors_ARG) || !strncmp(type_str, "raid", 4) || !strcmp(type_str, "mirror"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _read_pool_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
static int _read_pool_params(struct cmd_context *cmd, int *pargc, char ***pargv,
|
||||||
const char *type_str, int *pargc, char ***pargv)
|
const char *type_str, struct lvconvert_params *lp)
|
||||||
{
|
{
|
||||||
int cachepool = 0;
|
int cachepool = 0;
|
||||||
int thinpool = 0;
|
int thinpool = 0;
|
||||||
@ -339,8 +339,8 @@ static int _read_pool_params(struct lvconvert_params *lp, struct cmd_context *cm
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
static int _read_params(struct cmd_context *cmd, int argc, char **argv,
|
||||||
int argc, char **argv)
|
struct lvconvert_params *lp)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *tmp_str;
|
const char *tmp_str;
|
||||||
@ -447,7 +447,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
|
|||||||
type_str = "thin";
|
type_str = "thin";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_read_pool_params(lp, cmd, type_str, &argc, &argv))
|
if (!_read_pool_params(cmd, &argc, &argv, type_str, lp))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (!arg_count(cmd, background_ARG))
|
if (!arg_count(cmd, background_ARG))
|
||||||
@ -3509,7 +3509,7 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
|
|||||||
.target_attr = ~0,
|
.target_attr = ~0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!_read_params(&lp, cmd, argc, argv)) {
|
if (!_read_params(cmd, argc, argv, &lp)) {
|
||||||
stack;
|
stack;
|
||||||
return EINVALID_CMD_LINE;
|
return EINVALID_CMD_LINE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user