]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: conf: Correctly calculate exabyte unit
authorCole Robinson <crobinso@redhat.com>
Mon, 22 Feb 2010 20:49:27 +0000 (15:49 -0500)
committerCole Robinson <crobinso@redhat.com>
Tue, 23 Feb 2010 14:44:37 +0000 (09:44 -0500)
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.

src/conf/storage_conf.c

index eefa55f11d03576be62d65b185d7b2dd46b9c2e9..19a1db9d7104dd6a780a09ea52398da65b86485e 100644 (file)
@@ -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;