[partition] Fix build on older KPMCore

This commit is contained in:
Adriaan de Groot 2021-07-06 12:59:01 +02:00
parent a4fadcd9be
commit 96c2c62470
2 changed files with 7 additions and 1 deletions

View File

@ -463,7 +463,9 @@ isEfiFilesystemSuitable(const Partition* candidate)
}
cWarning() << "FAT32 filesystem is too small (" << size << "bytes)";
return false;
#ifdef WITH_KPMCORE4API
case FileSystem::Type::Fat12:
#endif
case FileSystem::Type::Fat16:
cWarning() << "FAT12 and FAT16 are probably not supported by EFI";
return false;

View File

@ -152,9 +152,11 @@ PartitionLayout::setDefaultFsType(FileSystem::Type defaultFsType)
case FileSystem::Lvm2_PV:
case FileSystem::Udf:
case FileSystem::Iso9660:
#ifdef WITH_KPMCORE4API
case FileSystem::Luks2:
case FileSystem::LinuxRaidMember:
case FileSystem::BitLocker:
#endif
// bad bad
cWarning() << "The selected default FS" << defaultFsType << "is not suitable." << "Using ext4 instead.";
defaultFsType = FileSystem::Ext4;
@ -173,7 +175,6 @@ PartitionLayout::setDefaultFsType(FileSystem::Type defaultFsType)
case FileSystem::F2fs:
// ok
break;
case FileSystem::Fat12:
case FileSystem::Fat16:
case FileSystem::Hfs:
case FileSystem::HfsPlus:
@ -181,8 +182,11 @@ PartitionLayout::setDefaultFsType(FileSystem::Type defaultFsType)
case FileSystem::Hpfs:
case FileSystem::Zfs:
case FileSystem::Nilfs2:
#ifdef WITH_KPMCORE4API
case FileSystem::Fat12:
case FileSystem::Apfs:
case FileSystem::Minix:
#endif
// weird
cWarning() << "The selected default FS" << defaultFsType << "is unusual, but not wrong.";
break;