mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-01 11:25:36 -04:00
[partition] Add support for partition type
This commit is contained in:
parent
2eb84e2de1
commit
c5ebe13aeb
7 changed files with 28 additions and 2 deletions
|
@ -118,6 +118,7 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const
|
|||
|
||||
bool
|
||||
PartitionLayout::addEntry( const QString& label,
|
||||
const QString& type,
|
||||
const QString& mountPoint,
|
||||
const QString& fs,
|
||||
const QString& size,
|
||||
|
@ -138,6 +139,7 @@ PartitionLayout::addEntry( const QString& label,
|
|||
}
|
||||
|
||||
entry.partLabel = label;
|
||||
entry.partType = type;
|
||||
entry.partMountPoint = mountPoint;
|
||||
PartUtils::findFS( fs, &entry.partFileSystem );
|
||||
if ( entry.partFileSystem == FileSystem::Unknown )
|
||||
|
@ -239,6 +241,14 @@ PartitionLayout::execute( Device* dev,
|
|||
{
|
||||
currentPartition->fileSystem().setLabel( part.partLabel );
|
||||
}
|
||||
if ( !part.partType.isEmpty() )
|
||||
{
|
||||
#if defined( WITH_KPMCORE42API )
|
||||
currentPartition->setType( part.partType );
|
||||
#else
|
||||
cWarning() << "Ignoring type; requires KPMcore >= 4.2.0.";
|
||||
#endif
|
||||
}
|
||||
// Some buggy (legacy) BIOSes test if the bootflag of at least one partition is set.
|
||||
// Otherwise they ignore the device in boot-order, so add it here.
|
||||
partList.append( currentPartition );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue