Re: [PATCH] Fix existing size calculation for NTFS (#520627)

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

 



Hi,

Looks ok,

Regards,

Hans


On 10/02/2009 04:12 AM, David Cantrell wrote:
Rounding errors when computing the existing size of NTFS volumes.
---
  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 a78ecb2..c549942 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))

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux