2013-09-18 00:46:58 +02:00
|
|
|
from ..partitions.single import SinglePartition
|
2013-09-15 13:19:45 +02:00
|
|
|
|
|
|
|
|
2013-10-04 21:12:48 +02:00
|
|
|
class NoPartitions(object):
|
2013-09-15 13:19:45 +02:00
|
|
|
|
2014-01-19 01:02:29 +01:00
|
|
|
def __init__(self, data, bootloader):
|
2014-01-19 12:39:07 +01:00
|
|
|
from common.bytes import Bytes
|
|
|
|
self.root = SinglePartition(Bytes(data['root']['size']), data['root']['filesystem'])
|
2013-09-15 18:26:22 +02:00
|
|
|
self.partitions = [self.root]
|
2013-09-15 13:19:45 +02:00
|
|
|
|
2013-09-22 21:20:09 +02:00
|
|
|
def is_blocking(self):
|
2013-11-26 21:07:39 +01:00
|
|
|
return self.root.fsm.current == 'mounted'
|
2013-09-22 21:20:09 +02:00
|
|
|
|
2013-09-15 13:19:45 +02:00
|
|
|
def get_total_size(self):
|
2014-01-19 12:39:07 +01:00
|
|
|
return self.root.get_end()
|