[partition] Set FS type explicitly if no layout is given

- the "simple" constructor for PartitionEntry left the FS type
  set as the constructor left it -- which is Unknown by default.
  This leads to install failures in systems that don't set a
  special layout but just want a single / -- because the FS is
  set to Unknown.
- massage the constructor and consumer of the code, push
  Ext4 FS in the tests and use the configured default in production.
This commit is contained in:
Adriaan de Groot 2020-11-02 16:01:10 +01:00
parent f78752303b
commit 23eabd74c6
3 changed files with 17 additions and 11 deletions

View file

@ -63,8 +63,9 @@ PartitionLayout::PartitionEntry::PartitionEntry()
{
}
PartitionLayout::PartitionEntry::PartitionEntry( const QString& mountPoint, const QString& size, const QString& minSize, const QString& maxSize )
: partAttributes( 0 )
PartitionLayout::PartitionEntry::PartitionEntry( FileSystem::Type type, const QString& mountPoint, const QString& size, const QString& minSize, const QString& maxSize )
: partType( type )
, partAttributes( 0 )
, partMountPoint( mountPoint )
, partSize( size )
, partMinSize( minSize )
@ -148,7 +149,7 @@ PartitionLayout::init( const QVariantList& config )
if ( !m_partLayout.count() )
{
addEntry( { QString( "/" ), QString( "100%" ) } );
addEntry( { m_defaultFsType, QString( "/" ), QString( "100%" ) } );
}
}