Fix storage size
Disk attributes are in sector size, so scale by 512. Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
This commit is contained in:
parent
6b82c1fc7e
commit
8902942fc0
|
@ -60,4 +60,5 @@ class FilesystemModel(models.Model):
|
||||||
return "%.3f %s" % (size / math.pow(1024, p), units[int(p)])
|
return "%.3f %s" % (size / math.pow(1024, p), units[int(p)])
|
||||||
|
|
||||||
def get_disk_size(self, disk):
|
def get_disk_size(self, disk):
|
||||||
return self._humanize_size(int(self.storage[disk]['attrs']['size']))
|
return self._humanize_size(
|
||||||
|
int(self.storage[disk]['attrs']['size']) * 512)
|
||||||
|
|
Loading…
Reference in New Issue