filesystem: get_guided_disks check_boot flag

This commit is contained in:
Dan Bungert 2022-07-05 11:52:14 -06:00
parent 6d403646b9
commit 1ee323bb95
1 changed files with 4 additions and 4 deletions

View File

@ -244,22 +244,22 @@ class FilesystemController(SubiquityController, FilesystemManipulator):
config, self.model._probe_data['blockdev'], is_probe_data=False)
await self.configured()
def get_guided_disks(self, with_reformatting=False):
def get_guided_disks(self, check_boot=True, with_reformatting=False):
disks = []
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):
continue
disks.append(raid)
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):
continue
cd = disk.constructed_device()
if isinstance(cd, Raid):
can_be_boot = False
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):
can_be_boot = True
if can_be_boot: