mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00

automatically from the first available partition. There is no need to fiddle with sizes while keeping the offsets in mind any longer. Introduced Bytes() class which makes it a lot easier to handle size units.
15 lines
396 B
Python
15 lines
396 B
Python
from ..partitions.single import SinglePartition
|
|
|
|
|
|
class NoPartitions(object):
|
|
|
|
def __init__(self, data, bootloader):
|
|
from common.bytes import Bytes
|
|
self.root = SinglePartition(Bytes(data['root']['size']), data['root']['filesystem'])
|
|
self.partitions = [self.root]
|
|
|
|
def is_blocking(self):
|
|
return self.root.fsm.current == 'mounted'
|
|
|
|
def get_total_size(self):
|
|
return self.root.get_end()
|