From: Cole Robinson Date: Mon, 22 Feb 2010 20:49:27 +0000 (-0500) Subject: storage: conf: Correctly calculate exabyte unit X-Git-Tag: v0.7.7~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67b44811af145d43ef4383301135f50990816110;p=thirdparty%2Flibvirt.git storage: conf: Correctly calculate exabyte unit 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. --- diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index eefa55f11d..19a1db9d71 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;