[libvirt] [PATCHv2 01/15] docs: use correct terminology for 1024 bytes

Peter Krempa pkrempa at redhat.com
Tue Mar 6 11:13:29 UTC 2012


On 03/06/2012 01:34 AM, Eric Blake wrote:
> Yes, I like kilobytes better than kibibytes (when I say kilobytes,
> I generally mean 1024).  But since the term is ambiguous, it can't
> hurt to say what we mean, by using both the correct name and
> calling out the numeric equivalent.
>
> * src/libvirt.c (virDomainGetMaxMemory, virDomainSetMaxMemory)
> (virDomainSetMemory, virDomainSetMemoryFlags)
> (virNodeGetFreeMemory): Tweak wording.
> * docs/formatdomain.html.in: Likewise.
> * docs/formatstorage.html.in: Likewise.
> ---
>
> v2: separate doc changes out early
>
>   docs/formatdomain.html.in  |   15 ++++++++-------
>   docs/formatstorage.html.in |    8 ++++++--
>   src/libvirt.c              |   10 +++++-----
>   3 files changed, 19 insertions(+), 14 deletions(-)
>

> diff --git a/docs/formatstorage.html.in b/docs/formatstorage.html.in
> index 0dcf6df..93d8ab2 100644
> --- a/docs/formatstorage.html.in
> +++ b/docs/formatstorage.html.in
> @@ -236,8 +236,12 @@
>           <br/>
>           By default this is specified in bytes, but an optional
>           <code>unit</code>  can be specified to adjust the passed value.
> -        Values can be: 'K' (kilobytes), 'M' (megabytes), 'G' (gigabytes),
> -        'T' (terabytes), 'P' (petabytes), or 'E' (exabytes).
> +        Values can be: 'K' (kibibytes, 2<sup>10</sup>  or 1024), 'M'

I'd probably write this as (kibibytes, 2<sup>10</sup>  or 1024 bytes) to 
be a little more specific, but it should be clear enough without it.

> +        (mebibytes, 2<sup>20</sup>  or 1,048,576), 'G' (gibibytes,
> +        2<sup>30</sup>  or 1,073,741,824), 'T' (tebibytes,
> +        2<sup>40</sup>  or 1,099,511,627,776), 'P' (pebibytes,
> +        2<sup>50</sup>  or 1,125,899,906,842,624), or 'E' (exbibytes,
> +        2<sup>60</sup>  or 1,152,921,504,606,846,976).
>           <span class="since">Since 0.4.1</span></dd>
>         <dt><code>capacity</code></dt>
>         <dd>Providing the logical capacity for the volume. This value is

ACK,

Peter




More information about the libvir-list mailing list