libcalamares: use namespace Calamares::Partition consistently

This commit is contained in:
Adriaan de Groot 2023-09-11 00:09:31 +02:00
parent 641e186b7c
commit f4e3964ee5
60 changed files with 135 additions and 134 deletions

View File

@ -79,7 +79,7 @@ mount( const std::string& device_path,
const std::string& filesystem_name, const std::string& filesystem_name,
const std::string& options ) const std::string& options )
{ {
return CalamaresUtils::Partition::mount( QString::fromStdString( device_path ), return Calamares::Partition::mount( QString::fromStdString( device_path ),
QString::fromStdString( mount_point ), QString::fromStdString( mount_point ),
QString::fromStdString( filesystem_name ), QString::fromStdString( filesystem_name ),
QString::fromStdString( options ) ); QString::fromStdString( options ) );

View File

@ -15,7 +15,7 @@
#include <optional> #include <optional>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -168,4 +168,4 @@ automountRestore( const std::shared_ptr< AutoMountInfo >& info )
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -15,7 +15,7 @@
#include <memory> #include <memory>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -46,6 +46,6 @@ DLLEXPORT std::shared_ptr< AutoMountInfo > automountDisable( bool disable = true
DLLEXPORT void automountRestore( const std::shared_ptr< AutoMountInfo >& t ); DLLEXPORT void automountRestore( const std::shared_ptr< AutoMountInfo >& t );
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif #endif

View File

@ -14,7 +14,7 @@
#include <QObject> #include <QObject>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -92,4 +92,4 @@ untranslatedFS( FileSystem::Type t )
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -23,7 +23,7 @@
#include <kpmcore/fs/filesystem.h> #include <kpmcore/fs/filesystem.h>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -95,6 +95,6 @@ isFilesystemUsedGS( FileSystem::Type filesystem )
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif // PARTITION_PARTITIONQUERY_H #endif // PARTITION_PARTITIONQUERY_H

View File

@ -17,7 +17,7 @@
static const QString fsUse_key = QStringLiteral( "filesystem_use" ); static const QString fsUse_key = QStringLiteral( "filesystem_use" );
bool bool
CalamaresUtils::Partition::isFilesystemUsedGS( const Calamares::GlobalStorage* gs, const QString& filesystemType ) Calamares::Partition::isFilesystemUsedGS( const Calamares::GlobalStorage* gs, const QString& filesystemType )
{ {
if ( !gs ) if ( !gs )
{ {
@ -34,7 +34,7 @@ CalamaresUtils::Partition::isFilesystemUsedGS( const Calamares::GlobalStorage* g
} }
void void
CalamaresUtils::Partition::useFilesystemGS( Calamares::GlobalStorage* gs, const QString& filesystemType, bool used ) Calamares::Partition::useFilesystemGS( Calamares::GlobalStorage* gs, const QString& filesystemType, bool used )
{ {
if ( gs ) if ( gs )
{ {
@ -46,7 +46,7 @@ CalamaresUtils::Partition::useFilesystemGS( Calamares::GlobalStorage* gs, const
} }
void void
CalamaresUtils::Partition::clearFilesystemGS( Calamares::GlobalStorage* gs ) Calamares::Partition::clearFilesystemGS( Calamares::GlobalStorage* gs )
{ {
if ( gs ) if ( gs )
{ {

View File

@ -19,7 +19,7 @@
#include "DllMacro.h" #include "DllMacro.h"
#include "JobQueue.h" #include "JobQueue.h"
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -73,6 +73,6 @@ isFilesystemUsedGS( const QString& filesystemType )
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif #endif

View File

@ -19,7 +19,7 @@
#include <QObject> #include <QObject>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -97,4 +97,4 @@ KPMManager::backend() const
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -20,7 +20,7 @@
class CoreBackend; class CoreBackend;
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -56,6 +56,6 @@ private:
}; };
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif // PARTITION_KPMMANAGER_H #endif // PARTITION_KPMMANAGER_H

View File

@ -89,7 +89,7 @@ KPMTests::testFSNames()
calaFSNames.reserve( fstypes.count() ); calaFSNames.reserve( fstypes.count() );
for ( const auto t : fstypes ) for ( const auto t : fstypes )
{ {
QString s = CalamaresUtils::Partition::untranslatedFS( t ); QString s = Calamares::Partition::untranslatedFS( t );
calaFSNames.append( s ); calaFSNames.append( s );
} }

View File

@ -19,7 +19,7 @@
#include <QDir> #include <QDir>
#include <QTemporaryDir> #include <QTemporaryDir>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -38,7 +38,7 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
cWarning() << "Can't mount on an empty mountpoint."; cWarning() << "Can't mount on an empty mountpoint.";
} }
return static_cast< int >( ProcessResult::Code::NoWorkingDirectory ); return static_cast< int >( CalamaresUtils::ProcessResult::Code::NoWorkingDirectory );
} }
QDir mountPointDir( mountPoint ); QDir mountPointDir( mountPoint );
@ -48,7 +48,7 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
if ( !ok ) if ( !ok )
{ {
cWarning() << "Could not create mountpoint" << mountPoint; cWarning() << "Could not create mountpoint" << mountPoint;
return static_cast< int >( ProcessResult::Code::NoWorkingDirectory ); return static_cast< int >( CalamaresUtils::ProcessResult::Code::NoWorkingDirectory );
} }
} }
@ -158,4 +158,4 @@ MtabInfo::fromMtabFilteredByPrefix( const QString& mountPrefix, const QString& m
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -20,7 +20,7 @@
#include <memory> #include <memory>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -107,6 +107,6 @@ struct DLLEXPORT MtabInfo
}; };
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif #endif

View File

@ -17,7 +17,7 @@
#include <kpmcore/core/partition.h> #include <kpmcore/core/partition.h>
#include <kpmcore/core/partitiontable.h> #include <kpmcore/core/partitiontable.h>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -136,4 +136,4 @@ PartitionIterator::end( PartitionTable* table )
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -23,7 +23,7 @@ class Device;
class Partition; class Partition;
class PartitionTable; class PartitionTable;
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -62,6 +62,6 @@ private:
}; };
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif // PARTITION_PARTITIONITERATOR_H #endif // PARTITION_PARTITIONITERATOR_H

View File

@ -18,7 +18,7 @@
#include <kpmcore/core/partition.h> #include <kpmcore/core/partition.h>
#include <kpmcore/core/partitiontable.h> #include <kpmcore/core/partitiontable.h>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -108,4 +108,4 @@ findPartitions( const QList< Device* >& devices, std::function< bool( Partition*
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -26,7 +26,7 @@ class Device;
class Partition; class Partition;
class PartitionTable; class PartitionTable;
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -70,6 +70,6 @@ Partition* findPartitionByPath( const QList< Device* >& devices, const QString&
QList< Partition* > findPartitions( const QList< Device* >& devices, QList< Partition* > findPartitions( const QList< Device* >& devices,
std::function< bool( Partition* ) > criterionFunction ); std::function< bool( Partition* ) > criterionFunction );
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif // PARTITION_PARTITIONQUERY_H #endif // PARTITION_PARTITIONQUERY_H

View File

@ -14,7 +14,7 @@
#include "utils/Logger.h" #include "utils/Logger.h"
#include "utils/Units.h" #include "utils/Units.h"
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -289,4 +289,4 @@ PartitionSize::operator==( const PartitionSize& other ) const
} }
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares

View File

@ -18,7 +18,7 @@
// Qt // Qt
#include <QString> #include <QString>
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -114,6 +114,6 @@ public:
}; };
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif // PARTITION_PARTITIONSIZE_H #endif // PARTITION_PARTITIONSIZE_H

View File

@ -14,7 +14,7 @@
#include "utils/Logger.h" #include "utils/Logger.h"
void void
CalamaresUtils::Partition::sync() Calamares::Partition::sync()
{ {
/* I would normally use full paths here, e.g. /sbin/udevadm and /bin/sync, /* I would normally use full paths here, e.g. /sbin/udevadm and /bin/sync,
* but there's enough variation / opinion on where these executables * but there's enough variation / opinion on where these executables

View File

@ -13,7 +13,7 @@
#include "DllMacro.h" #include "DllMacro.h"
namespace CalamaresUtils namespace Calamares
{ {
namespace Partition namespace Partition
{ {
@ -35,6 +35,6 @@ struct DLLEXPORT Syncer
}; };
} // namespace Partition } // namespace Partition
} // namespace CalamaresUtils } // namespace Calamares
#endif #endif

View File

@ -17,8 +17,8 @@
#include <QObject> #include <QObject>
#include <QtTest/QtTest> #include <QtTest/QtTest>
using SizeUnit = CalamaresUtils::Partition::SizeUnit; using SizeUnit = Calamares::Partition::SizeUnit;
using PartitionSize = CalamaresUtils::Partition::PartitionSize; using PartitionSize = Calamares::Partition::PartitionSize;
Q_DECLARE_METATYPE( SizeUnit ) Q_DECLARE_METATYPE( SizeUnit )
@ -161,8 +161,8 @@ PartitionServiceTests::testUnitNormalisation()
void void
PartitionServiceTests::testFilesystemGS() PartitionServiceTests::testFilesystemGS()
{ {
using CalamaresUtils::Partition::isFilesystemUsedGS; using Calamares::Partition::isFilesystemUsedGS;
using CalamaresUtils::Partition::useFilesystemGS; using Calamares::Partition::useFilesystemGS;
// Some filesystems names, they don't have to be real // Some filesystems names, they don't have to be real
const QStringList fsNames { "ext4", "zfs", "berries", "carrot" }; const QStringList fsNames { "ext4", "zfs", "berries", "carrot" };
@ -212,7 +212,7 @@ PartitionServiceTests::testFilesystemGS()
useFilesystemGS( &gs, "ext4", true ); useFilesystemGS( &gs, "ext4", true );
QVERIFY( isFilesystemUsedGS( &gs, "EXT4" ) ); QVERIFY( isFilesystemUsedGS( &gs, "EXT4" ) );
CalamaresUtils::Partition::clearFilesystemGS( &gs ); Calamares::Partition::clearFilesystemGS( &gs );
QVERIFY( !isFilesystemUsedGS( &gs, "ZFS" ) ); QVERIFY( !isFilesystemUsedGS( &gs, "ZFS" ) );
QVERIFY( !isFilesystemUsedGS( &gs, "EXT4" ) ); QVERIFY( !isFilesystemUsedGS( &gs, "EXT4" ) );
QVERIFY( !isFilesystemUsedGS( &gs, "ext4" ) ); QVERIFY( !isFilesystemUsedGS( &gs, "ext4" ) );

View File

@ -46,7 +46,7 @@ main( int argc, char** argv )
Logger::setupLogfile(); Logger::setupLogfile();
Logger::setupLogLevel( Logger::LOGDEBUG ); Logger::setupLogLevel( Logger::LOGDEBUG );
CalamaresUtils::Partition::automountDisable( argv[ 1 ][ 1 ] == 'd' ); Calamares::Partition::automountDisable( argv[ 1 ][ 1 ] == 'd' );
return 0; return 0;
} }

View File

@ -27,7 +27,7 @@
#include <kpmcore/ops/resizeoperation.h> #include <kpmcore/ops/resizeoperation.h>
#include <kpmcore/util/report.h> #include <kpmcore/util/report.h>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
ResizeFSJob::ResizeFSJob( QObject* parent ) ResizeFSJob::ResizeFSJob( QObject* parent )
: Calamares::CppJob( parent ) : Calamares::CppJob( parent )

View File

@ -25,7 +25,7 @@ class CoreBackend; // From KPMCore
class Device; // From KPMCore class Device; // From KPMCore
class Partition; class Partition;
using PartitionSize = CalamaresUtils::Partition::PartitionSize; using PartitionSize = Calamares::Partition::PartitionSize;
class PLUGINDLLEXPORT ResizeFSJob : public Calamares::CppJob class PLUGINDLLEXPORT ResizeFSJob : public Calamares::CppJob
{ {
@ -51,7 +51,7 @@ public:
PartitionSize minimumSize() const { return m_atleast; } PartitionSize minimumSize() const { return m_atleast; }
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
PartitionSize m_size; PartitionSize m_size;
PartitionSize m_atleast; PartitionSize m_atleast;
QString m_fsname; // Either this, or devicename, is set, not both QString m_fsname; // Either this, or devicename, is set, not both

View File

@ -23,7 +23,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QStringList> #include <QStringList>
using SizeUnit = CalamaresUtils::Partition::SizeUnit; using SizeUnit = Calamares::Partition::SizeUnit;
QTEST_GUILESS_MAIN( FSResizerTests ) QTEST_GUILESS_MAIN( FSResizerTests )

View File

@ -283,7 +283,7 @@ fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configu
if ( configurationMap.contains( "efiSystemPartitionSize" ) ) if ( configurationMap.contains( "efiSystemPartitionSize" ) )
{ {
const QString sizeString = CalamaresUtils::getString( configurationMap, "efiSystemPartitionSize" ); const QString sizeString = CalamaresUtils::getString( configurationMap, "efiSystemPartitionSize" );
CalamaresUtils::Partition::PartitionSize part_size = CalamaresUtils::Partition::PartitionSize( sizeString ); Calamares::Partition::PartitionSize part_size = Calamares::Partition::PartitionSize( sizeString );
if ( part_size.isValid() ) if ( part_size.isValid() )
{ {
// Insert once as string, once as a size-in-bytes; // Insert once as string, once as a size-in-bytes;

View File

@ -24,9 +24,9 @@
#include <QColor> #include <QColor>
#include <QMap> #include <QMap>
using CalamaresUtils::Partition::isPartitionFreeSpace; using Calamares::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::isPartitionNew; using Calamares::Partition::isPartitionNew;
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
static const int NUM_PARTITION_COLORS = 5; static const int NUM_PARTITION_COLORS = 5;
static const int NUM_NEW_PARTITION_COLORS = 4; static const int NUM_NEW_PARTITION_COLORS = 4;

View File

@ -21,7 +21,7 @@
#include <QProcess> #include <QProcess>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
namespace PartUtils namespace PartUtils
{ {

View File

@ -27,7 +27,7 @@
#include <qregularexpression.h> #include <qregularexpression.h>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
namespace KPMHelpers namespace KPMHelpers
{ {

View File

@ -32,8 +32,8 @@
#include <QProcess> #include <QProcess>
#include <QTemporaryDir> #include <QTemporaryDir>
using CalamaresUtils::Partition::isPartitionFreeSpace; using Calamares::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::isPartitionNew; using Calamares::Partition::isPartitionNew;
namespace PartUtils namespace PartUtils
{ {
@ -205,7 +205,7 @@ canBeResized( DeviceModel* dm, const QString& partitionPath, const Logger::Once&
for ( int i = 0; i < dm->rowCount(); ++i ) for ( int i = 0; i < dm->rowCount(); ++i )
{ {
Device* dev = dm->deviceForIndex( dm->index( i ) ); Device* dev = dm->deviceForIndex( dm->index( i ) );
Partition* candidate = CalamaresUtils::Partition::findPartitionByPath( { dev }, partitionPath ); Partition* candidate = Calamares::Partition::findPartitionByPath( { dev }, partitionPath );
if ( candidate ) if ( candidate )
{ {
return canBeResized( candidate, o ); return canBeResized( candidate, o );
@ -246,7 +246,7 @@ lookForFstabEntries( const QString& partitionPath )
FstabEntryList fstabEntries; FstabEntryList fstabEntries;
CalamaresUtils::Partition::TemporaryMount mount( partitionPath, QString(), mountOptions.join( ',' ) ); Calamares::Partition::TemporaryMount mount( partitionPath, QString(), mountOptions.join( ',' ) );
if ( mount.isValid() ) if ( mount.isValid() )
{ {
QFile fstabFile( mount.path() + "/etc/fstab" ); QFile fstabFile( mount.path() + "/etc/fstab" );

View File

@ -63,9 +63,9 @@
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
using CalamaresUtils::Partition::isPartitionFreeSpace; using Calamares::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::isPartitionNew; using Calamares::Partition::isPartitionNew;
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
PartitionCoreModule::RefreshHelper::RefreshHelper( PartitionCoreModule* module ) PartitionCoreModule::RefreshHelper::RefreshHelper( PartitionCoreModule* module )
: m_module( module ) : m_module( module )
@ -807,7 +807,7 @@ PartitionCoreModule::scanForEfiSystemPartitions()
} }
QList< Partition* > efiSystemPartitions QList< Partition* > efiSystemPartitions
= CalamaresUtils::Partition::findPartitions( devices, PartUtils::isEfiBootable ); = Calamares::Partition::findPartitions( devices, PartUtils::isEfiBootable );
if ( efiSystemPartitions.isEmpty() ) if ( efiSystemPartitions.isEmpty() )
{ {

View File

@ -257,7 +257,7 @@ private:
DeviceInfo* infoForDevice( const Device* ) const; DeviceInfo* infoForDevice( const Device* ) const;
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
QList< DeviceInfo* > m_deviceInfos; QList< DeviceInfo* > m_deviceInfos;
QList< Partition* > m_efiSystemPartitions; QList< Partition* > m_efiSystemPartitions;

View File

@ -232,7 +232,7 @@ PartitionLayout::createPartitions( Device* dev,
// warnings to ensure that all the cases are covered below. // warnings to ensure that all the cases are covered below.
// We need to ignore the percent-defined until later // We need to ignore the percent-defined until later
qint64 sectors = 0; qint64 sectors = 0;
if ( entry.partSize.unit() != CalamaresUtils::Partition::SizeUnit::Percent ) if ( entry.partSize.unit() != Calamares::Partition::SizeUnit::Percent )
{ {
sectors = entry.partSize.toSectors( totalSectors, dev->logicalSize() ); sectors = entry.partSize.toSectors( totalSectors, dev->logicalSize() );
} }
@ -264,7 +264,7 @@ PartitionLayout::createPartitions( Device* dev,
// Assign sectors for percentage-defined partitions. // Assign sectors for percentage-defined partitions.
for ( const auto& entry : qAsConst( m_partLayout ) ) for ( const auto& entry : qAsConst( m_partLayout ) )
{ {
if ( entry.partSize.unit() == CalamaresUtils::Partition::SizeUnit::Percent ) if ( entry.partSize.unit() == Calamares::Partition::SizeUnit::Percent )
{ {
qint64 sectors qint64 sectors
= entry.partSize.toSectors( availableSectors + partSectorsMap.value( &entry ), dev->logicalSize() ); = entry.partSize.toSectors( availableSectors + partSectorsMap.value( &entry ), dev->logicalSize() );

View File

@ -38,9 +38,9 @@ public:
QString partMountPoint; QString partMountPoint;
FileSystem::Type partFileSystem = FileSystem::Unknown; FileSystem::Type partFileSystem = FileSystem::Unknown;
QVariantMap partFeatures; QVariantMap partFeatures;
CalamaresUtils::Partition::PartitionSize partSize; Calamares::Partition::PartitionSize partSize;
CalamaresUtils::Partition::PartitionSize partMinSize; Calamares::Partition::PartitionSize partMinSize;
CalamaresUtils::Partition::PartitionSize partMaxSize; Calamares::Partition::PartitionSize partMaxSize;
/// @brief All-zeroes PartitionEntry /// @brief All-zeroes PartitionEntry
PartitionEntry(); PartitionEntry();

View File

@ -28,8 +28,8 @@
// Qt // Qt
#include <QColor> #include <QColor>
using CalamaresUtils::Partition::isPartitionFreeSpace; using Calamares::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::isPartitionNew; using Calamares::Partition::isPartitionNew;
//- ResetHelper -------------------------------------------- //- ResetHelper --------------------------------------------
PartitionModel::ResetHelper::ResetHelper( PartitionModel* model ) PartitionModel::ResetHelper::ResetHelper( PartitionModel* model )
@ -163,7 +163,7 @@ PartitionModel::data( const QModelIndex& index, int role ) const
} }
if ( col == FileSystemColumn ) if ( col == FileSystemColumn )
{ {
return CalamaresUtils::Partition::prettyNameForFileSystemType( partition->fileSystem().type() ); return Calamares::Partition::prettyNameForFileSystemType( partition->fileSystem().type() );
} }
if ( col == FileSystemLabelColumn ) if ( col == FileSystemLabelColumn )
{ {
@ -206,7 +206,7 @@ PartitionModel::data( const QModelIndex& index, int role ) const
} }
} }
QString prettyFileSystem QString prettyFileSystem
= CalamaresUtils::Partition::prettyNameForFileSystemType( partition->fileSystem().type() ); = Calamares::Partition::prettyNameForFileSystemType( partition->fileSystem().type() );
qint64 size = ( partition->lastSector() - partition->firstSector() + 1 ) * m_device->logicalSize(); qint64 size = ( partition->lastSector() - partition->firstSector() + 1 ) * m_device->logicalSize();
QString prettySize = formatByteSize( size ); QString prettySize = formatByteSize( size );
return QVariant( name + " " + prettyFileSystem + " " + prettySize ); return QVariant( name + " " + prettyFileSystem + " " + prettySize );

View File

@ -55,9 +55,9 @@
#include <QtConcurrent/QtConcurrent> #include <QtConcurrent/QtConcurrent>
using Calamares::Widgets::PrettyRadioButton; using Calamares::Widgets::PrettyRadioButton;
using CalamaresUtils::Partition::findPartitionByPath; using Calamares::Partition::findPartitionByPath;
using CalamaresUtils::Partition::isPartitionFreeSpace; using Calamares::Partition::isPartitionFreeSpace;
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
using InstallChoice = Config::InstallChoice; using InstallChoice = Config::InstallChoice;
using SwapChoice = Config::SwapChoice; using SwapChoice = Config::SwapChoice;

View File

@ -43,8 +43,8 @@
#include <QRegularExpressionValidator> #include <QRegularExpressionValidator>
#include <QSet> #include <QSet>
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
static QSet< FileSystem::Type > s_unmountableFS( { FileSystem::Unformatted, static QSet< FileSystem::Type > s_unmountableFS( { FileSystem::Unformatted,
FileSystem::LinuxSwap, FileSystem::LinuxSwap,
@ -352,7 +352,7 @@ CreatePartitionDialog::checkMountPointSelection()
void void
CreatePartitionDialog::initPartResizerWidget( Partition* partition ) CreatePartitionDialog::initPartResizerWidget( Partition* partition )
{ {
QColor color = CalamaresUtils::Partition::isPartitionFreeSpace( partition ) QColor color = Calamares::Partition::isPartitionFreeSpace( partition )
? ColorUtils::colorForPartitionInFreeSpace( partition ) ? ColorUtils::colorForPartitionInFreeSpace( partition )
: ColorUtils::colorForPartition( partition ); : ColorUtils::colorForPartition( partition );
m_partitionSizeController->init( m_device, partition, color ); m_partitionSizeController->init( m_device, partition, color );

View File

@ -42,8 +42,8 @@
#include <QProcess> #include <QProcess>
#include <QPushButton> #include <QPushButton>
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device, EditExistingPartitionDialog::EditExistingPartitionDialog( Device* device,
Partition* partition, Partition* partition,

View File

@ -134,7 +134,7 @@ PartitionPage::updateButtons()
Q_ASSERT( model ); Q_ASSERT( model );
Partition* partition = model->partitionForIndex( index ); Partition* partition = model->partitionForIndex( index );
Q_ASSERT( partition ); Q_ASSERT( partition );
const bool isFree = CalamaresUtils::Partition::isPartitionFreeSpace( partition ); const bool isFree = Calamares::Partition::isPartitionFreeSpace( partition );
const bool isExtended = partition->roles().has( PartitionRole::Extended ); const bool isExtended = partition->roles().has( PartitionRole::Extended );
// An extended partition can have a "free space" child; that one does // An extended partition can have a "free space" child; that one does
@ -144,7 +144,7 @@ PartitionPage::updateButtons()
const bool hasChildren = isExtended const bool hasChildren = isExtended
&& ( partition->children().length() > 1 && ( partition->children().length() > 1
|| ( partition->children().length() == 1 || ( partition->children().length() == 1
&& !CalamaresUtils::Partition::isPartitionFreeSpace( partition->children().at( 0 ) ) ) ); && !Calamares::Partition::isPartitionFreeSpace( partition->children().at( 0 ) ) ) );
const bool isInVG = m_core->isInVG( partition ); const bool isInVG = m_core->isInVG( partition );
@ -419,7 +419,7 @@ PartitionPage::onEditClicked()
Partition* partition = model->partitionForIndex( index ); Partition* partition = model->partitionForIndex( index );
Q_ASSERT( partition ); Q_ASSERT( partition );
if ( CalamaresUtils::Partition::isPartitionNew( partition ) ) if ( Calamares::Partition::isPartitionNew( partition ) )
{ {
updatePartitionToCreate( model->device(), partition ); updatePartitionToCreate( model->device(), partition );
} }
@ -487,7 +487,7 @@ PartitionPage::onPartitionViewActivated()
// but I don't expect there will be other occurences of triggering the same // but I don't expect there will be other occurences of triggering the same
// action from multiple UI elements in this page, so it does not feel worth // action from multiple UI elements in this page, so it does not feel worth
// the price. // the price.
if ( CalamaresUtils::Partition::isPartitionFreeSpace( partition ) ) if ( Calamares::Partition::isPartitionFreeSpace( partition ) )
{ {
m_ui->createButton->click(); m_ui->createButton->click();
} }

View File

@ -27,7 +27,7 @@
#include <QPainterPath> #include <QPainterPath>
#include <QStyleOption> #include <QStyleOption>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
static const int VIEW_HEIGHT static const int VIEW_HEIGHT
= qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts
@ -103,7 +103,7 @@ PartitionSplitterWidget::init( Device* dev, bool drawNestedPartitions )
{ {
PartitionSplitterItem newItem = { ( *it )->partitionPath(), PartitionSplitterItem newItem = { ( *it )->partitionPath(),
ColorUtils::colorForPartition( *it ), ColorUtils::colorForPartition( *it ),
CalamaresUtils::Partition::isPartitionFreeSpace( *it ), Calamares::Partition::isPartitionFreeSpace( *it ),
( *it )->capacity(), ( *it )->capacity(),
PartitionSplitterItem::Normal, PartitionSplitterItem::Normal,
{} }; {} };

View File

@ -28,13 +28,13 @@ AutoMountManagementJob::exec()
if ( m_stored ) if ( m_stored )
{ {
cDebug() << "Restore automount settings"; cDebug() << "Restore automount settings";
CalamaresUtils::Partition::automountRestore( m_stored ); Calamares::Partition::automountRestore( m_stored );
m_stored.reset(); m_stored.reset();
} }
else else
{ {
cDebug() << "Set automount to" << ( m_disable ? "disable" : "enable" ); cDebug() << "Set automount to" << ( m_disable ? "disable" : "enable" );
m_stored = CalamaresUtils::Partition::automountDisable( m_disable ); m_stored = Calamares::Partition::automountDisable( m_disable );
} }
return Calamares::JobResult::ok(); return Calamares::JobResult::ok();
} }

View File

@ -17,7 +17,7 @@
/** /**
* This job sets automounting to a specific value, and when run a * This job sets automounting to a specific value, and when run a
* second time, **re**sets to the original value. See the documentation * second time, **re**sets to the original value. See the documentation
* for CalamaresUtils::Partition::automountDisable() for details. * for Calamares::Partition::automountDisable() for details.
* Use @c true to **disable** automounting. * Use @c true to **disable** automounting.
* *
* Effectively: queue the **same** job twice; the first time it runs * Effectively: queue the **same** job twice; the first time it runs
@ -36,7 +36,7 @@ public:
private: private:
bool m_disable; bool m_disable;
decltype( CalamaresUtils::Partition::automountDisable( true ) ) m_stored; decltype( Calamares::Partition::automountDisable( true ) ) m_stored;
}; };
#endif /* PARTITION_AUTOMOUNTMANAGEMENTJOB_H */ #endif /* PARTITION_AUTOMOUNTMANAGEMENTJOB_H */

View File

@ -28,7 +28,7 @@
#include <QProcess> #include <QProcess>
#include <QStringList> #include <QStringList>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
/** @brief Returns list of partitions on a given @p deviceName /** @brief Returns list of partitions on a given @p deviceName
@ -381,7 +381,7 @@ Calamares::JobResult
ClearMountsJob::exec() ClearMountsJob::exec()
{ {
const QString deviceName = m_deviceNode.split( '/' ).last(); const QString deviceName = m_deviceNode.split( '/' ).last();
CalamaresUtils::Partition::Syncer s; Calamares::Partition::Syncer s;
QList< MessageAndPath > goodNews; QList< MessageAndPath > goodNews;
apply( getCryptoDevices( m_mapperExceptions ), tryCryptoClose, goodNews ); apply( getCryptoDevices( m_mapperExceptions ), tryCryptoClose, goodNews );

View File

@ -46,7 +46,7 @@ ClearTempMountsJob::exec()
{ {
Logger::Once o; Logger::Once o;
// Fetch a list of current mounts to Calamares temporary directories. // Fetch a list of current mounts to Calamares temporary directories.
using MtabInfo = CalamaresUtils::Partition::MtabInfo; using MtabInfo = Calamares::Partition::MtabInfo;
auto targetMounts = MtabInfo::fromMtabFilteredByPrefix( QStringLiteral( "/tmp/calamares-" ) ); auto targetMounts = MtabInfo::fromMtabFilteredByPrefix( QStringLiteral( "/tmp/calamares-" ) );
if ( targetMounts.isEmpty() ) if ( targetMounts.isEmpty() )
@ -59,7 +59,7 @@ ClearTempMountsJob::exec()
for ( const auto& m : qAsConst( targetMounts ) ) for ( const auto& m : qAsConst( targetMounts ) )
{ {
cDebug() << o << "Will try to umount path" << m.mountPoint; cDebug() << o << "Will try to umount path" << m.mountPoint;
if ( CalamaresUtils::Partition::unmount( m.mountPoint, { "-lv" } ) == 0 ) if ( Calamares::Partition::unmount( m.mountPoint, { "-lv" } ) == 0 )
{ {
// Returns the program's exit code, so 0 is success // Returns the program's exit code, so 0 is success
goodNews.append( QString( "Successfully unmounted %1." ).arg( m.mountPoint ) ); goodNews.append( QString( "Successfully unmounted %1." ).arg( m.mountPoint ) );

View File

@ -31,8 +31,8 @@
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qregularexpression.h> #include <qregularexpression.h>
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
/** @brief Create /** @brief Create
* *
@ -174,7 +174,7 @@ prettyGptEntries( const Partition* partition )
QString QString
CreatePartitionJob::prettyName() const CreatePartitionJob::prettyName() const
{ {
const PartitionTable* table = CalamaresUtils::Partition::getPartitionTable( m_partition ); const PartitionTable* table = Calamares::Partition::getPartitionTable( m_partition );
if ( table && table->type() == PartitionTable::TableType::gpt ) if ( table && table->type() == PartitionTable::TableType::gpt )
{ {
QString entries = prettyGptEntries( m_partition ); QString entries = prettyGptEntries( m_partition );
@ -206,7 +206,7 @@ CreatePartitionJob::prettyName() const
QString QString
CreatePartitionJob::prettyDescription() const CreatePartitionJob::prettyDescription() const
{ {
const PartitionTable* table = CalamaresUtils::Partition::getPartitionTable( m_partition ); const PartitionTable* table = Calamares::Partition::getPartitionTable( m_partition );
if ( table && table->type() == PartitionTable::TableType::gpt ) if ( table && table->type() == PartitionTable::TableType::gpt )
{ {
QString entries = prettyGptEntries( m_partition ); QString entries = prettyGptEntries( m_partition );
@ -240,7 +240,7 @@ CreatePartitionJob::prettyDescription() const
QString QString
CreatePartitionJob::prettyStatusMessage() const CreatePartitionJob::prettyStatusMessage() const
{ {
const PartitionTable* table = CalamaresUtils::Partition::getPartitionTable( m_partition ); const PartitionTable* table = Calamares::Partition::getPartitionTable( m_partition );
if ( table && table->type() == PartitionTable::TableType::gpt ) if ( table && table->type() == PartitionTable::TableType::gpt )
{ {
QString type = prettyGptType( m_partition ); QString type = prettyGptType( m_partition );

View File

@ -27,7 +27,7 @@
// Qt // Qt
#include <QProcess> #include <QProcess>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
CreatePartitionTableJob::CreatePartitionTableJob( Device* device, PartitionTable::TableType type ) CreatePartitionTableJob::CreatePartitionTableJob( Device* device, PartitionTable::TableType type )
: m_device( device ) : m_device( device )

View File

@ -39,7 +39,7 @@ public:
Device* device() const { return m_device; } Device* device() const { return m_device; }
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
Device* m_device; Device* m_device;
PartitionTable::TableType m_type; PartitionTable::TableType m_type;
PartitionTable* createTable(); PartitionTable* createTable();

View File

@ -33,7 +33,7 @@ public:
void undoPreview(); void undoPreview();
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
QString m_vgName; QString m_vgName;
QVector< const Partition* > m_pvList; QVector< const Partition* > m_pvList;
qint32 m_peSize; qint32 m_peSize;

View File

@ -27,7 +27,7 @@ public:
Calamares::JobResult exec() override; Calamares::JobResult exec() override;
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
LvmDevice* m_device; LvmDevice* m_device;
}; };

View File

@ -34,9 +34,9 @@
#include <QFileInfo> #include <QFileInfo>
#include <QProcess> #include <QProcess>
using CalamaresUtils::Partition::PartitionIterator; using Calamares::Partition::PartitionIterator;
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
typedef QHash< QString, QString > UuidForPartitionHash; typedef QHash< QString, QString > UuidForPartitionHash;
@ -306,14 +306,14 @@ FillGlobalStorageJob::prettyStatusMessage() const
* .. mark as "2" if it's one of the claimed / in-use FSses * .. mark as "2" if it's one of the claimed / in-use FSses
* *
* Stores a GS key called "filesystem_use" with this mapping. * Stores a GS key called "filesystem_use" with this mapping.
* @see CalamaresUtils::Partition::useFilesystemGS() * @see Calamares::Partition::useFilesystemGS()
*/ */
static void static void
storeFSUse( Calamares::GlobalStorage* storage, const QVariantList& partitions ) storeFSUse( Calamares::GlobalStorage* storage, const QVariantList& partitions )
{ {
if ( storage ) if ( storage )
{ {
CalamaresUtils::Partition::clearFilesystemGS( storage ); Calamares::Partition::clearFilesystemGS( storage );
for ( const auto& p : partitions ) for ( const auto& p : partitions )
{ {
const auto pmap = p.toMap(); const auto pmap = p.toMap();
@ -325,7 +325,7 @@ storeFSUse( Calamares::GlobalStorage* storage, const QVariantList& partitions )
continue; continue;
} }
CalamaresUtils::Partition::useFilesystemGS( storage, fs, true ); Calamares::Partition::useFilesystemGS( storage, fs, true );
} }
} }
} }

View File

@ -24,8 +24,8 @@
#include <kpmcore/ops/createfilesystemoperation.h> #include <kpmcore/ops/createfilesystemoperation.h>
#include <kpmcore/util/report.h> #include <kpmcore/util/report.h>
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
FormatPartitionJob::FormatPartitionJob( Device* device, Partition* partition ) FormatPartitionJob::FormatPartitionJob( Device* device, Partition* partition )
: PartitionJob( partition ) : PartitionJob( partition )

View File

@ -36,7 +36,7 @@ public slots:
void iprogress( int percent ); void iprogress( int percent );
protected: protected:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
Partition* m_partition; Partition* m_partition;
}; };

View File

@ -28,7 +28,7 @@ public:
Calamares::JobResult exec() override; Calamares::JobResult exec() override;
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
LvmDevice* m_device; LvmDevice* m_device;
}; };

View File

@ -35,7 +35,7 @@ private:
QString targetPartitions() const; QString targetPartitions() const;
private: private:
CalamaresUtils::Partition::KPMManager m_kpmcore; Calamares::Partition::KPMManager m_kpmcore;
LvmDevice* m_device; LvmDevice* m_device;
QVector< const Partition* > m_partitionList; QVector< const Partition* > m_partitionList;
}; };

View File

@ -26,8 +26,8 @@
#include <kpmcore/util/report.h> #include <kpmcore/util/report.h>
using CalamaresUtils::BytesToMiB; using CalamaresUtils::BytesToMiB;
using CalamaresUtils::Partition::untranslatedFS; using Calamares::Partition::untranslatedFS;
using CalamaresUtils::Partition::userVisibleFS; using Calamares::Partition::userVisibleFS;
SetPartFlagsJob::SetPartFlagsJob( Device* device, Partition* partition, PartitionTable::Flags flags ) SetPartFlagsJob::SetPartFlagsJob( Device* device, Partition* partition, PartitionTable::Flags flags )
: PartitionJob( partition ) : PartitionJob( partition )

View File

@ -41,7 +41,7 @@ AutoMountJobTests::testRunThrice()
{ {
Logger::setupLogLevel( Logger::LOGVERBOSE ); Logger::setupLogLevel( Logger::LOGVERBOSE );
auto original = CalamaresUtils::Partition::automountDisable( true ); auto original = Calamares::Partition::automountDisable( true );
cDebug() << "Got automount info" << Logger::Pointer( original ); cDebug() << "Got automount info" << Logger::Pointer( original );
AutoMountManagementJob j( false ); AutoMountManagementJob j( false );
@ -49,7 +49,7 @@ AutoMountJobTests::testRunThrice()
QVERIFY( j.exec() ); QVERIFY( j.exec() );
QVERIFY( j.exec() ); QVERIFY( j.exec() );
CalamaresUtils::Partition::automountRestore( original ); Calamares::Partition::automountRestore( original );
} }
void void

View File

@ -26,7 +26,7 @@ class SmartStatus;
QTEST_GUILESS_MAIN( CreateLayoutsTests ) QTEST_GUILESS_MAIN( CreateLayoutsTests )
static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; static Calamares::Partition::KPMManager* kpmcore = nullptr;
static Calamares::JobQueue* jobqueue = nullptr; static Calamares::JobQueue* jobqueue = nullptr;
#define LOGICAL_SIZE 512 #define LOGICAL_SIZE 512
@ -40,7 +40,7 @@ void
CreateLayoutsTests::init() CreateLayoutsTests::init()
{ {
jobqueue = new Calamares::JobQueue( nullptr ); jobqueue = new Calamares::JobQueue( nullptr );
kpmcore = new CalamaresUtils::Partition::KPMManager(); kpmcore = new Calamares::Partition::KPMManager();
} }
void void

View File

@ -34,12 +34,12 @@ private Q_SLOTS:
void testPartUtilScanDevices(); void testPartUtilScanDevices();
private: private:
std::unique_ptr< CalamaresUtils::Partition::KPMManager > m_d; std::unique_ptr< Calamares::Partition::KPMManager > m_d;
bool m_isRoot = false; bool m_isRoot = false;
}; };
DevicesTests::DevicesTests() DevicesTests::DevicesTests()
: m_d( std::make_unique< CalamaresUtils::Partition::KPMManager >() ) : m_d( std::make_unique< Calamares::Partition::KPMManager >() )
, m_isRoot( geteuid() == 0 ) , m_isRoot( geteuid() == 0 )
{ {
} }

View File

@ -27,7 +27,8 @@
QTEST_GUILESS_MAIN( PartitionJobTests ) QTEST_GUILESS_MAIN( PartitionJobTests )
using namespace Calamares; using Calamares::job_ptr;
using Calamares::JobList;
using namespace CalamaresUtils::Units; using namespace CalamaresUtils::Units;
class PartitionMounter class PartitionMounter
@ -99,11 +100,11 @@ writeFile( const QString& path, const QByteArray data )
} }
} }
static Partition* static ::Partition*
firstFreePartition( PartitionNode* parent ) firstFreePartition( PartitionNode* parent )
{ {
for ( auto child : parent->children() ) for ( auto child : parent->children() )
if ( CalamaresUtils::Partition::isPartitionFreeSpace( child ) ) if ( Calamares::Partition::isPartitionFreeSpace( child ) )
{ {
return child; return child;
} }
@ -111,13 +112,13 @@ firstFreePartition( PartitionNode* parent )
} }
//- QueueRunner --------------------------------------------------------------- //- QueueRunner ---------------------------------------------------------------
QueueRunner::QueueRunner( JobQueue* queue ) QueueRunner::QueueRunner( Calamares::JobQueue* queue )
: m_queue( queue ) : m_queue( queue )
, m_finished( false ) // Same initalizations as in ::run() , m_finished( false ) // Same initalizations as in ::run()
, m_success( true ) , m_success( true )
{ {
connect( m_queue, &JobQueue::finished, this, &QueueRunner::onFinished ); connect( m_queue, &Calamares::JobQueue::finished, this, &QueueRunner::onFinished );
connect( m_queue, &JobQueue::failed, this, &QueueRunner::onFailed ); connect( m_queue, &Calamares::JobQueue::failed, this, &QueueRunner::onFailed );
} }
QueueRunner::~QueueRunner() QueueRunner::~QueueRunner()
@ -153,7 +154,7 @@ QueueRunner::onFailed( const QString& message, const QString& details )
QFAIL( qPrintable( msg ) ); QFAIL( qPrintable( msg ) );
} }
static CalamaresUtils::Partition::KPMManager* kpmcore = nullptr; static Calamares::Partition::KPMManager* kpmcore = nullptr;
//- PartitionJobTests ------------------------------------------------------------------ //- PartitionJobTests ------------------------------------------------------------------
PartitionJobTests::PartitionJobTests() PartitionJobTests::PartitionJobTests()
@ -172,7 +173,7 @@ PartitionJobTests::initTestCase()
0 ); 0 );
} }
kpmcore = new CalamaresUtils::Partition::KPMManager(); kpmcore = new Calamares::Partition::KPMManager();
FileSystemFactory::init(); FileSystemFactory::init();
refreshDevice(); refreshDevice();

View File

@ -58,7 +58,7 @@ unmountTargetMounts( const QString& rootMountPoint )
targetMountPath.append( '/' ); targetMountPath.append( '/' );
} }
using MtabInfo = CalamaresUtils::Partition::MtabInfo; using MtabInfo = Calamares::Partition::MtabInfo;
auto targetMounts = MtabInfo::fromMtabFilteredByPrefix( targetMountPath ); auto targetMounts = MtabInfo::fromMtabFilteredByPrefix( targetMountPath );
std::sort( targetMounts.begin(), targetMounts.end(), MtabInfo::mountPointOrder ); std::sort( targetMounts.begin(), targetMounts.end(), MtabInfo::mountPointOrder );
@ -67,7 +67,7 @@ unmountTargetMounts( const QString& rootMountPoint )
{ {
// Returns the program's exit code, so 0 is success and non-0 // Returns the program's exit code, so 0 is success and non-0
// (truthy) is a failure. // (truthy) is a failure.
if ( CalamaresUtils::Partition::unmount( m.mountPoint, { "-lv" } ) ) if ( Calamares::Partition::unmount( m.mountPoint, { "-lv" } ) )
{ {
return Calamares::JobResult::error( return Calamares::JobResult::error(
QCoreApplication::translate( UmountJob::staticMetaObject.className(), QCoreApplication::translate( UmountJob::staticMetaObject.className(),