diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-10-01 16:10:06 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-10-02 10:04:15 -1000 |
commit | c3a63e0c154f68ef7ab5a89bfc4476ff9d6f9768 (patch) | |
tree | 2405900758188e9aae4d7a0cba65d435aa46de30 /storage/formats/fs.py | |
parent | 47cbca433675ec8e822b547b404c95c32b789ad5 (diff) | |
download | anaconda-c3a63e0c154f68ef7ab5a89bfc4476ff9d6f9768.tar.gz anaconda-c3a63e0c154f68ef7ab5a89bfc4476ff9d6f9768.tar.xz anaconda-c3a63e0c154f68ef7ab5a89bfc4476ff9d6f9768.zip |
Fix existing size calculation for NTFS (#520627)
Rounding errors when computing the existing size of NTFS volumes.
Diffstat (limited to 'storage/formats/fs.py')
-rw-r--r-- | storage/formats/fs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py index a78ecb2c2..c5499429e 100644 --- a/storage/formats/fs.py +++ b/storage/formats/fs.py @@ -27,6 +27,7 @@ - migration - bug 472127: allow creation of tmpfs filesystems (/tmp, /var/tmp, &c) """ +import math import os import tempfile import isys @@ -262,7 +263,7 @@ class FS(DeviceFormat): size *= value # report current size as megabytes - size = size / 1024.0 / 1024.0 + size = math.floor(size / 1024.0 / 1024.0) except Exception as e: log.error("failed to obtain size of filesystem on %s: %s" % (self.device, e)) |