[sheepdog] [PATCH] lib/option: support 'B' notation for byte
Robin Dong
robin.k.dong at gmail.com
Mon Feb 17 10:11:32 CET 2014
Reviewed-by: Robin Dong <sanbai at taobao.com>
2014-02-12 15:51 GMT+08:00 Liu Yuan <namei.unix at gmail.com>:
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
> lib/option.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/lib/option.c b/lib/option.c
> index 872a573..21bdf68 100644
> --- a/lib/option.c
> +++ b/lib/option.c
> @@ -87,14 +87,16 @@ int option_parse_size(const char *value, uint64_t *ret)
> case 'k':
> sizef *= 1024;
> case 'b':
> + case 'B':
> case '\0':
> *ret = (uint64_t) sizef;
> break;
> default:
> err:
> sd_err("Invalid size '%s'", value);
> - sd_err("You may use k, M, G, T or P suffixes for "
> - "kilobytes, megabytes, gigabytes, terabytes and
> petabytes.");
> + sd_err("You may use B, K, M, G, T or P suffixes for "
> + "bytes, kilobytes, megabytes, gigabytes, terabytes
> and"
> + " petabytes.");
> return -1;
> }
>
> --
> 1.8.1.2
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
>
--
--
Best Regard
Robin Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20140217/32bc12af/attachment-0004.html>
More information about the sheepdog
mailing list