[partition] Make mountPoint optional

Some devices cannot be mounted (as DM_verity_hash), therefore, it is
nosense to set a mountPoint for them.
This commit is contained in:
Gaël PORTAY 2020-06-17 14:16:20 -04:00
parent 486cdaeeb6
commit 1f9f506a16
2 changed files with 2 additions and 3 deletions

View File

@ -134,8 +134,7 @@ PartitionLayout::init( const QVariantList& config )
{
QVariantMap pentry = r.toMap();
if ( !pentry.contains( "name" ) || !pentry.contains( "mountPoint" ) || !pentry.contains( "filesystem" )
|| !pentry.contains( "size" ) )
if ( !pentry.contains( "name" ) || !pentry.contains( "filesystem" ) || !pentry.contains( "size" ) )
{
cError() << "Partition layout entry #" << config.indexOf( r )
<< "lacks mandatory attributes, switching to default layout.";

View File

@ -208,7 +208,7 @@ defaultFileSystemType: "ext4"
# - type: partition type (optional parameter; gpt only; requires KPMCore >= 4.2.0)
# - attributes: partition attributes (optional parameter; gpt only; requires KPMCore >= 4.2.0)
# - filesystem: filesystem type
# - mountPoint: partition mount point
# - mountPoint: partition mount point (optional parameter; not mounted if unset)
# - size: partition size in bytes (append 'K', 'M' or 'G' for KiB, MiB or GiB)
# or
# % of the available drive space if a '%' is appended to the value