master - lvmcmdline: support size_mb_arg_with_percent
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=464f3b8abd03633ff5dd2c5fe5585d921af8931f Commit: 464f3b8abd03633ff5dd2c5fe5585d921af8931f Parent: 519fbe71e46c747a254bc200ea93396591e1a1a3 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Oct 30 14:52:37 2014 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Oct 30 23:58:49 2014 +0100
lvmcmdline: support size_mb_arg_with_percent
New size_mb_arg_with_percent is able to read size_mb_arg but also it's able to read % values.
Percent parsing is share with int_arg_with_sign_and_percent.
--- WHATS_NEW | 1 + tools/lvmcmdline.c | 66 +++++++++++++++++++++++++++++++++++++--------------- tools/tools.h | 1 + 3 files changed, 49 insertions(+), 19 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.112 - ===================================== + Introduce size_mb_arg_with_percent() for advanced size arg reading. Add extra support for '.' as decimal point in size args. Configurable support for creation of sparse volumes with thin-pools. Update and correct lvcreate and lvcovert man pages.
tools/lvmcmdline.c +47 -19
102 lines not on this page · raw message
tools/tools.h +1 -0
@@ -129,6 +129,7 @@ int discards_arg(struct cmd_context *cmd, struct arg_values *av);int mirrorlog_arg (struct cmd_context *cmd,struct arg_values *av);int size_kb_arg (struct cmd_context *cmd,struct arg_values *av);int size_mb_arg (struct cmd_context *cmd,struct arg_values *av); +int size_mb_arg_with_percent (struct cmd_context *cmd,struct arg_values *av);int int_arg (struct cmd_context *cmd,struct arg_values *av);int int_arg_with_sign (struct cmd_context *cmd,struct arg_values *av);int int_arg_with_sign_and_percent (struct cmd_context *cmd,struct arg_values *av);