[partition] Add support for partition uuid
This commit is contained in:
parent
7e83296aa2
commit
da6f728cd4
@ -883,6 +883,7 @@ PartitionCoreModule::initLayout( const QVariantList& config )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ),
|
if ( !m_partLayout->addEntry( CalamaresUtils::getString( pentry, "name" ),
|
||||||
|
CalamaresUtils::getString( pentry, "uuid" ),
|
||||||
CalamaresUtils::getString( pentry, "type" ),
|
CalamaresUtils::getString( pentry, "type" ),
|
||||||
CalamaresUtils::getString( pentry, "mountPoint" ),
|
CalamaresUtils::getString( pentry, "mountPoint" ),
|
||||||
CalamaresUtils::getString( pentry, "filesystem" ),
|
CalamaresUtils::getString( pentry, "filesystem" ),
|
||||||
|
@ -118,6 +118,7 @@ PartitionLayout::addEntry( const QString& mountPoint, const QString& size, const
|
|||||||
|
|
||||||
bool
|
bool
|
||||||
PartitionLayout::addEntry( const QString& label,
|
PartitionLayout::addEntry( const QString& label,
|
||||||
|
const QString& uuid,
|
||||||
const QString& type,
|
const QString& type,
|
||||||
const QString& mountPoint,
|
const QString& mountPoint,
|
||||||
const QString& fs,
|
const QString& fs,
|
||||||
@ -140,6 +141,7 @@ PartitionLayout::addEntry( const QString& label,
|
|||||||
}
|
}
|
||||||
|
|
||||||
entry.partLabel = label;
|
entry.partLabel = label;
|
||||||
|
entry.partUUID = uuid;
|
||||||
entry.partType = type;
|
entry.partType = type;
|
||||||
entry.partMountPoint = mountPoint;
|
entry.partMountPoint = mountPoint;
|
||||||
PartUtils::findFS( fs, &entry.partFileSystem );
|
PartUtils::findFS( fs, &entry.partFileSystem );
|
||||||
@ -244,6 +246,10 @@ PartitionLayout::execute( Device* dev,
|
|||||||
currentPartition->setLabel( part.partLabel );
|
currentPartition->setLabel( part.partLabel );
|
||||||
currentPartition->fileSystem().setLabel( part.partLabel );
|
currentPartition->fileSystem().setLabel( part.partLabel );
|
||||||
}
|
}
|
||||||
|
if ( !part.partUUID.isEmpty() )
|
||||||
|
{
|
||||||
|
currentPartition->setUUID( part.partUUID );
|
||||||
|
}
|
||||||
if ( !part.partType.isEmpty() )
|
if ( !part.partType.isEmpty() )
|
||||||
{
|
{
|
||||||
#if defined( WITH_KPMCORE42API )
|
#if defined( WITH_KPMCORE42API )
|
||||||
|
@ -41,6 +41,7 @@ public:
|
|||||||
struct PartitionEntry
|
struct PartitionEntry
|
||||||
{
|
{
|
||||||
QString partLabel;
|
QString partLabel;
|
||||||
|
QString partUUID;
|
||||||
QString partType;
|
QString partType;
|
||||||
QString partMountPoint;
|
QString partMountPoint;
|
||||||
FileSystem::Type partFileSystem = FileSystem::Unknown;
|
FileSystem::Type partFileSystem = FileSystem::Unknown;
|
||||||
@ -76,6 +77,7 @@ public:
|
|||||||
const QString& min = QString(),
|
const QString& min = QString(),
|
||||||
const QString& max = QString() );
|
const QString& max = QString() );
|
||||||
bool addEntry( const QString& label,
|
bool addEntry( const QString& label,
|
||||||
|
const QString& uuid,
|
||||||
const QString& type,
|
const QString& type,
|
||||||
const QString& mountPoint,
|
const QString& mountPoint,
|
||||||
const QString& fs,
|
const QString& fs,
|
||||||
|
@ -127,6 +127,7 @@ defaultFileSystemType: "ext4"
|
|||||||
# - name: filesystem label
|
# - name: filesystem label
|
||||||
# and
|
# and
|
||||||
# partition name (gpt only; since KPMCore 4.2.0)
|
# partition name (gpt only; since KPMCore 4.2.0)
|
||||||
|
# - uuid: partition uuid (optional parameter; gpt only; requires KPMCore >= 4.2.0)
|
||||||
# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0)
|
# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0)
|
||||||
# - filesystem: filesystem type
|
# - filesystem: filesystem type
|
||||||
# - mountPoint: partition mount point
|
# - mountPoint: partition mount point
|
||||||
|
Loading…
Reference in New Issue
Block a user