master - cleanup: rename func
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=89e1190ef01943b59207c2093e643a6b06dc9be6 Commit: 89e1190ef01943b59207c2093e643a6b06dc9be6 Parent: 911d6efa51fac96846e109dbff8839cd3fb6cb25 Author: Zdenek Kabelac <[email protected]> AuthorDate: Sat Sep 27 18:53:08 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Sun Sep 28 13:49:01 2014 +0200
cleanup: rename func
Update name of function read_and_validate_major_minor and put it into the right header file toollib.h.
(In release update for f09f85d027d8833)
--- tools/lvchange.c | 4 +- tools/lvcreate.c | 4 +- tools/lvmcmdline.c | 54 -------------------------------------------------- tools/toollib.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++- tools/toollib.h | 4 +++ tools/tools.h | 3 -- 6 files changed, 63 insertions(+), 62 deletions(-)
tools/lvchange.c +2 -2
@@ -542,8 +542,8 @@ static int lvchange_persistent(struct cmd_context *cmd, {enum activation_change activate =CHANGE_AN ; -if (!read_and_validate_major_minor (cmd, lv->vg->fid->fmt, - &lv->major, &lv->minor)) +if (!get_and_validate_major_minor (cmd, lv->vg->fid->fmt, + &lv->major, &lv->minor)) return_0;if (lv->minor ==-1 ) {
tools/lvcreate.c +2 -2
@@ -767,8 +767,8 @@ static int _read_activation_params(struct lvcreate_params *lp,return 0 ; } -if (!read_and_validate_major_minor (cmd, vg->fid->fmt, - &lp->major, &lp->minor)) +if (!get_and_validate_major_minor (cmd, vg->fid->fmt, + &lp->major, &lp->minor)) return_0; }else if (arg_is_set (cmd, major_ARG) ||arg_is_set (cmd, minor_ARG)) {log_error ("--major and --minor require -My." );
tools/lvmcmdline.c +0 -54
60 lines not on this page · raw message
tools/toollib.c +55 -1
64 lines not on this page · raw message
tools/toollib.h +4 -0
@@ -140,4 +140,8 @@ int get_stripe_params(struct cmd_context *cmd, uint32_t *stripes,int change_tag (struct cmd_context *cmd,struct volume_group *vg,struct logical_volume *lv,struct physical_volume *pv,int arg); +int get_and_validate_major_minor (const struct cmd_context *cmd, +const struct format_type *fmt, +int32_t *major,int32_t *minor); +#endif
tools/tools.h +0 -3
@@ -138,9 +138,6 @@ int segtype_arg(struct cmd_context *cmd, struct arg_values *av);int alloc_arg (struct cmd_context *cmd,struct arg_values *av);int readahead_arg (struct cmd_context *cmd,struct arg_values *av);int metadatacopies_arg (struct cmd_context *cmd __attribute__((unused)),struct arg_values *av); -int read_and_validate_major_minor (const struct cmd_context *cmd, -const struct format_type *fmt, -int32_t *major,int32_t *minor);/* we use the enums to access the switches */ unsigned arg_count (const struct cmd_context *cmd,int a);