diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-03 15:43:47 +0200 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-06-03 15:43:47 +0200 |
commit | 7ff45e5fcc497ed9a07056b2401fb6bd9834ea97 (patch) | |
tree | 7f075fcd30ae3272aed4732bb85eb328a9ffd737 /cli | |
parent | 10d7b972cabaaffa099465c08f31dfe676ba5bbb (diff) |
disk: use proper partition sizes
Use base 2 size units for the partition configuration units.
Using base 10 units causes incoherency with the web.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/objects/disks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/objects/disks.py b/cli/objects/disks.py index c7315af..f38f420 100644 --- a/cli/objects/disks.py +++ b/cli/objects/disks.py @@ -30,7 +30,7 @@ class OgDisk(): def setup_disk(rest, args): def parse_size(size): size = size.upper() - units = {"M": 10**3, "G": 10**6, "T": 10**9} # Mapped to K + units = {"M": 1024, "G": 1024**2, "T": 1024**3} # Mapped to K # size = re.sub(r'(\d+)([MGT])', r'\1 \2', size) match = re.match(r'(\d+)([MGT])', size) if match: |