mirror of https://git.48k.eu/ogcli/
setup disk: fix padding
ogServer expects a 4-partition setup. When specifying less than that, the partition setup needs to be padded with EMPTY partitions. Fixes a bug in which this padding is not valid.master v0.1
parent
b765ee50d3
commit
e7b302c8b8
|
@ -134,8 +134,9 @@ class OgDisk():
|
|||
'format': do_format}
|
||||
payload['partition_setup'].append(part)
|
||||
|
||||
last_partnum = int(parsed_args.part[-1][0][0])
|
||||
# Pad with empty partitions if no 4th part was defined
|
||||
for i in range(len(parsed_args.part)+1, 5):
|
||||
for i in range(last_partnum + 1, 5):
|
||||
part = {'partition': str(i), 'code':'EMPTY',
|
||||
'filesystem': 'EMPTY', 'size': '0',
|
||||
'format': '0'}
|
||||
|
|
Loading…
Reference in New Issue