filesystem: get_guided_disks check_boot flag
This commit is contained in:
parent
6d403646b9
commit
1ee323bb95
|
@ -244,22 +244,22 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
|
||||||
config, self.model._probe_data['blockdev'], is_probe_data=False)
|
config, self.model._probe_data['blockdev'], is_probe_data=False)
|
||||||
await self.configured()
|
await self.configured()
|
||||||
|
|
||||||
def get_guided_disks(self, with_reformatting=False):
|
def get_guided_disks(self, check_boot=True, with_reformatting=False):
|
||||||
disks = []
|
disks = []
|
||||||
for raid in self.model._all(type='raid'):
|
for raid in self.model._all(type='raid'):
|
||||||
if not boot.can_be_boot_device(
|
if check_boot and not boot.can_be_boot_device(
|
||||||
raid, with_reformatting=with_reformatting):
|
raid, with_reformatting=with_reformatting):
|
||||||
continue
|
continue
|
||||||
disks.append(raid)
|
disks.append(raid)
|
||||||
for disk in self.model._all(type='disk'):
|
for disk in self.model._all(type='disk'):
|
||||||
if not boot.can_be_boot_device(
|
if check_boot and not boot.can_be_boot_device(
|
||||||
disk, with_reformatting=with_reformatting):
|
disk, with_reformatting=with_reformatting):
|
||||||
continue
|
continue
|
||||||
cd = disk.constructed_device()
|
cd = disk.constructed_device()
|
||||||
if isinstance(cd, Raid):
|
if isinstance(cd, Raid):
|
||||||
can_be_boot = False
|
can_be_boot = False
|
||||||
for v in cd._subvolumes:
|
for v in cd._subvolumes:
|
||||||
if boot.can_be_boot_device(
|
if check_boot and boot.can_be_boot_device(
|
||||||
v, with_reformatting=with_reformatting):
|
v, with_reformatting=with_reformatting):
|
||||||
can_be_boot = True
|
can_be_boot = True
|
||||||
if can_be_boot:
|
if can_be_boot:
|
||||||
|
|
Loading…
Reference in New Issue