Re: [libvirt] [PATCH 01/10] storage: conf: Correctly calculate exabyte unit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 22, 2010 at 05:10:49PM -0500, Cole Robinson wrote:
> We were using 'Y' to mean exabyte, when the correct abbreviation would be
> 'E' ('Y' is yettabyte, which is exabyte * 1024 * 1024). While it isn't
> strictly backwards compatible, I highly doubt anyone was actually using
> this broken behavior, so I don't see any harm in in dropping 'Y' handling.
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  src/conf/storage_conf.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index eefa55f..19a1db9 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -980,8 +980,8 @@ virStorageSize(const char *unit,
>              mult = 1024ull * 1024ull * 1024ull * 1024ull * 1024ull;
>              break;
>  
> -        case 'y':
> -        case 'Y':
> +        case 'e':
> +        case 'E':
>              mult = 1024ull * 1024ull * 1024ull * 1024ull * 1024ull *
>                  1024ull;
>              break;

  Yeah, it's bad to change this but better to fix now while unlikely to
be used than keeping this as-is,

  ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]