From: Zdenek Kabelac Date: Fri, 31 Oct 2014 10:31:22 +0000 (+0100) Subject: cleanup: standard params ordering X-Git-Tag: v2_02_112~61 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=228e7ff767b916a033da6d83cfa6970c5cfaba00;p=lvm2.git cleanup: standard params ordering Pass lvconvert_params as last arg. --- diff --git a/tools/lvconvert.c b/tools/lvconvert.c index f2eb5f586..22058ea93 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -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")); } -static int _read_pool_params(struct lvconvert_params *lp, struct cmd_context *cmd, - const char *type_str, int *pargc, char ***pargv) +static int _read_pool_params(struct cmd_context *cmd, int *pargc, char ***pargv, + const char *type_str, struct lvconvert_params *lp) { int cachepool = 0; int thinpool = 0; @@ -339,8 +339,8 @@ static int _read_pool_params(struct lvconvert_params *lp, struct cmd_context *cm return 1; } -static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, - int argc, char **argv) +static int _read_params(struct cmd_context *cmd, int argc, char **argv, + struct lvconvert_params *lp) { int i; const char *tmp_str; @@ -447,7 +447,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd, 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; if (!arg_count(cmd, background_ARG)) @@ -3509,7 +3509,7 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv) .target_attr = ~0, }; - if (!_read_params(&lp, cmd, argc, argv)) { + if (!_read_params(cmd, argc, argv, &lp)) { stack; return EINVALID_CMD_LINE; }