Merge pull request #1560 from gportay/partition-mount-make-mountPoint-and-filesystem-optionals

[partition,mount] Make mountPoint and filesystem optionals
This commit is contained in:
Adriaan de Groot 2020-11-02 23:25:53 +01:00 committed by GitHub
commit 2516f18d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 51 deletions

View file

@ -103,8 +103,7 @@ PartitionLayout::init( FileSystem::Type defaultFsType, const QVariantList& confi
{
QVariantMap pentry = r.toMap();
if ( !pentry.contains( "name" ) || !pentry.contains( "mountPoint" ) || !pentry.contains( "filesystem" )
|| !pentry.contains( "size" ) )
if ( !pentry.contains( "name" ) || !pentry.contains( "size" ) )
{
cError() << "Partition layout entry #" << config.indexOf( r )
<< "lacks mandatory attributes, switching to default layout.";
@ -117,7 +116,7 @@ PartitionLayout::init( FileSystem::Type defaultFsType, const QVariantList& confi
CalamaresUtils::getString( pentry, "type" ),
CalamaresUtils::getUnsignedInteger( pentry, "attributes", 0 ),
CalamaresUtils::getString( pentry, "mountPoint" ),
CalamaresUtils::getString( pentry, "filesystem" ),
CalamaresUtils::getString( pentry, "filesystem", "unformatted" ),
CalamaresUtils::getSubMap( pentry, "features", ok ),
CalamaresUtils::getString( pentry, "size", QStringLiteral( "0" ) ),
CalamaresUtils::getString( pentry, "minSize", QStringLiteral( "0" ) ),