mirror of https://git.48k.eu/ogcli/
disk: use proper partition sizes
Use base 2 size units for the partition configuration units. Using base 10 units causes incoherency with the web.master
parent
10d7b972ca
commit
7ff45e5fcc
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue